Skip to main content

Benchmark resources usage

Project description

Monitor Process Resources Usage

Bench is able to monitor:
  • CPU time (user time, sys time, real time)

  • Memory usage (vms usage, rss usage)

  • Output to TSV(tab-delimited files)

Examples

  • Example 1: simple command

> monitor.py  sleep 2
PID Prog    UsrTime SysTime RealTime        MaxVms  MaxRss  AvgVms  AvgRss  Path    Command
21056       python  0       0       1.9     77705216        6696960 77705216.0      6696960.0       /home/zhanxw    "/home/zhanxw/python27/bin/python /home/zhanxw/bin/monitor.py sleep 2"
21057       sleep   0       0       1.8     7581696 368640  7581696.0       368640.0        /home/zhanxw    "sleep 2"
21054       python  0       0       2.1     77705216        6991872 74768556.8744   6687656.42056   /home/zhanxw    "/home/zhanxw/python27/bin/python /home/zhanxw/bin/monitor.py sleep 2"
  • Example 2: complex shell commands

> monitor.py -i 0.1 'sleep 2 & sleep 4 & seq 1000000 >/dev/null & wait'
PID Prog    UsrTime SysTime RealTime        MaxVms  MaxRss  AvgVms  AvgRss  Path    Command
21920       python  0       0       3.9     77713408        6701056 77713408.0      6701056.0       /home/zhanxw    "/home/zhanxw/python27/bin/python /home/zhanxw/bin/monitor.py -i 0.1 sleep 2 & sleep 4 & seq 1000000 >/dev/null & wait"
21921       sh      0       0       3.8     12886016        1417216 12886016.0      1417216.0       /home/zhanxw    "sh -c sleep 2 & sleep 4 & seq 1000000 >/dev/null & wait"
21922       sleep   0       0       1.8     7581696 368640  7581696.0       368640.0        /home/zhanxw    "sleep 2"
21923       sleep   0       0       3.8     7581696 368640  7581696.0       368640.0        /home/zhanxw    "sleep 4"
21924       seq     0.55    0       0.4     7602176 630784  7602176.0       630784.0        /home/zhanxw    "seq 1000000"
21918       python  0       0       4.1     77713408        7000064 76043060.5519   6826628.73828   /home/zhanxw    "/home/zhanxw/python27/bin/python /home/zhanxw/bin/monitor.py -i 0.1 sleep 2 & sleep 4 & seq 1000000 >/dev/null & wait"

NOTE

Shell (/bin/sh) are used to execute commands. It’s a convenient feature with some shell exploit hazard.

This version requires psutil.

Contact

Xiaowei Zhan<zhanxw[at]gmail.com>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bench-1.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

bench-1.4.linux-x86_64.exe (67.6 kB view details)

Uploaded Source

File details

Details for the file bench-1.4.tar.gz.

File metadata

  • Download URL: bench-1.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bench-1.4.tar.gz
Algorithm Hash digest
SHA256 64e46448a42df334db91e804d7cdfb2d795b881c1c6efcff1d89c2e386c09d7d
MD5 f92139699d62c8e94c23354dee4a7af3
BLAKE2b-256 030f8603f1540994683a6c77a522d63d5f4d0f73e4312ad88edb0010636db854

See more details on using hashes here.

File details

Details for the file bench-1.4.linux-x86_64.exe.

File metadata

File hashes

Hashes for bench-1.4.linux-x86_64.exe
Algorithm Hash digest
SHA256 3244c6ecb2c9ec6d4a631476226ab8078bdc7063d4f9735ece9120729f0b6000
MD5 874dd7dd365570bfe4acb13038a8c9ce
BLAKE2b-256 ffcbc0291c14e9979c45f4a93d65e7529a43b867939f1652ece12ecdee2b8738

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page