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.3.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for bench-1.3.tar.gz
Algorithm Hash digest
SHA256 ead39d538d35b9b34d314ac171c36086e10c1e7f9cab6731b3709eaae61a9e5a
MD5 c473101a262245d23b263f1d7587e426
BLAKE2b-256 242bd1d4f38bf3d1d47fe5c8daed774327524de31446b738a91495744545b679

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bench-1.3.linux-x86_64.exe
Algorithm Hash digest
SHA256 47eb823bab50b6f0072bec376a457016716ecada593f417ef269a908ff3fa338
MD5 58b1e55eabf36bfabd7010fc3f612ad3
BLAKE2b-256 1b097dd7a572e15bde8e80b74449946313fa9ab17110e7bc7d95f56cac23ffd9

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