Skip to main content

Record the system load at the execution of the command line and display it graphically

Project description



Record the system load at the execution of the command line and display it graphically



安装方式 / Installation

  • Install from pypi
pip install oscillo
  • Install from local
python install

使用方式 / Usage

通过命令行参数启动 / Boot start by command line parameter

命令行参数的格式是 "<name>: <command [args]>"

  • name: 命令行的别名/id (任意字符串),当--commands/-c参数指定多个命令时,该值将作为命令的唯一标识,不可重复
  • command [args]: 需要测试资源消耗的命令,比如 gzip file.ext


oscillo -c 'gzip: gzip file.ext' -o output-file
  • -c 代表将执行一个linux cmd 命令。参数后面可以跟以空格隔开的多个参数

  • -o 结果输出文件:

命令执行完成后,会在当前目录下生成一个<output-file>.log 文件。文本结构是json 格式. 数据结构如下

  "test": {
            "elapsed": 0.022143125534057617,  //总执行时间
            "cpu": [], 
            "memory": []


-c/--commands 可以接受多个参数,以空格隔开,任务会线性执行。使用场景:对比多个命令对资源的消耗

e.g.: 对比gziptar命令对资源的消耗:

oscillo -c 't1: gzip file.ext'  't2: tar czf target.tar.gz file1' -o output




通过配置文件启动 / Boot start by config file

当命令很长或者很多时,可以使用配置文件启动 Whe the commands is too many, you can boot start by config file

oscillo --config </path/to/config-file.yml> [-g]

配置文件模板 / Config file

The command line in commands will be executed in order

# Demo
    name: gzip
    cmd: gzip big-file

    name: tar
    cmd: tar -zcf tmp.tar.gz big-file

output: gzip-and-tar-gz

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

oscillo-1.0.0.tar.gz (10.4 kB view hashes)

Uploaded source

Built Distribution

oscillo-1.0.0-py2.py3-none-any.whl (10.7 kB view hashes)

Uploaded py2 py3

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