{ "info": { "author": "Tetsuya Morimoto", "author_email": "tetsuya.morimoto@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries" ], "description": "# iostat-tool\n\nparse and visualize iostat output\n\n## Requirements\n\n* Python >= 3.4\n * iostat-tool uses [asyncio](https://docs.python.org/3/library/asyncio.html) to monitor output of iostat\n* [Matplotlib](https://matplotlib.org/)\n* Support output of iostat for Linux only\n * `iostat` command needs `-t` argument to get timestamp, and `-ymxt 1` arguments are recommended\n```bash\n$ man iostat\n -t Print the time for each report displayed. The timestamp format may depend on the value of the S_TIME_FORMAT environment variable (see below).\n```\n\n## How to install\n\n### for user\n\n```bash\n$ pip install iostat-tool\n```\n\n### for developer\n\nCreate virtualenv to install `iostat-tool`.\n\n```bash\n$ mkdir virtualenvs\n$ virtualenv -p python3 virtualenvs/venv\n$ source virtualenvs/venv/bin/activate\n(venv) $\n```\n\nInstall `iostat-tool` package from the repository.\n\n```bash\n(venv) $ git clone https://github.com/t2y/iostat-tool.git\n(venv) $ cd iostat-tool\n(venv) $ python setup.py develop\n```\n\n### Base CLI options\n\nConfirm `iostat-cli` works as below.\n\n```bash\n(venv) $ iostat-cli --help\nusage: iostat-cli [-h] [--backend BACKEND] [--data DATA]\n [--fig-output FIGOUTPUT] [--fig-size FIGSIZE]\n [--output OUTPUT] [--disks DISKS [DISKS ...]]\n [--since SINCE] [--until UNTIL] [-v] [--version]\n {csv,monitor,plot} ...\n\npositional arguments:\n {csv,monitor,plot}\n\noptional arguments:\n -h, --help show this help message and exit\n --backend BACKEND set backend for matplotlib, use TkAgg to monitor in\n the foreground\n --data DATA set path to iostat output file\n --fig-output FIGOUTPUT\n set path to save graph\n --fig-size FIGSIZE set figure size\n --output OUTPUT set path to save output of iostat\n --disks DISKS [DISKS ...]\n set disk name in iostat\n --since SINCE set since datetime, format: yyyymmddHHMISS\n --until UNTIL set until datetime, format: yyyymmddHHMISS\n -v, --verbose set verbose mode\n --version show program version\n```\n\n### Sub Commands\n\n#### csv\n\nCreate csv/tsv file from output of iostat.\n\n```bash\n(venv) $ iostat-cli csv --help\nusage: iostat-cli csv [-h] [--dialect {excel,excel-tab,unix}]\n [--separator {comma,tab}]\n\noptional arguments:\n -h, --help show this help message and exit\n --dialect {excel,excel-tab,unix}\n set dialect for csv writer, default is excel\n --separator {comma,tab}\n set separator, default is comma\n```\n\n#### plot\n\nCreate image file rendered by matplotlib from output of iostat.\n\n```bash\n(venv) $ iostat-cli plot --help\nusage: iostat-cli plot [-h] [--plot-type {plotter,scatter}]\n [--subplots {io_rqm,iops,io_transfer,%util,avgrq-sz,avgqu-sz,await,svctm} [{io_rqm,iops,io_transfer,%util,avgrq-sz,avgqu-sz,await,svctm} ...]]\n [--vlines VLINES [VLINES ...]]\n\noptional arguments:\n -h, --help show this help message and exit\n --plot-type {plotter,scatter}\n set plot type (\"plotter\" by default)\n --subplots {io_rqm,iops,io_transfer,%util,avgrq-sz,avgqu-sz,await,svctm} [{io_rqm,iops,io_transfer,%util,avgrq-sz,avgqu-sz,await,svctm} ...]\n set subplots to show\n --vlines VLINES [VLINES ...]\n set vertical line, format: yyyymmddHHMISS\n --x-datetime-format X_DATETIME_FORMAT\n set datetime format for devices x-axis\n --title TITLE set title for graph\n --without-cpu don't plot CPU data\n --cpu-only plot only CPU data\n```\n\n#### monitor\n\nMonitor and logging output of `iostat` command.\n\n```bash\n(venv) $ iostat-cli monitor --help\nusage: iostat-cli monitor [-h] [--iostat-args IOSTAT_ARGS]\n [--max-queue-size MAX_QUEUE_SIZE]\n\noptional arguments:\n -h, --help show this help message and exit\n --iostat-args IOSTAT_ARGS\n set arguments for iostat\n --max-queue-size MAX_QUEUE_SIZE\n set queue size to read iostat output\n```\n\n## How to use\n\nThis is sample image rendered by matplotlib.\n\n![](https://github.com/t2y/iostat-tool/raw/master/tests/fixtures/sample-iostat.png)\n\n\n### there is already an iostat.ouput as data file\n\n#### plot\n\n* show all subplots of /dev/sda and cpu average\n\n```bash\n(venv) $ iostat-cli --data tests/fixtures/sample_iostat.output --disk sda --fig-output my-iostat.png plot\n(venv) $ file my-iostat.png\nmy-iostat.png: PNG image data, 1800 x 1400, 8-bit/color RGBA, non-interlaced\n```\n\n* show any subplots of /dev/sda and cpu average\n * filter `io_rqm` and `iops` with `--subplots`\n\n```bash\n(venv) $ iostat-cli --data tests/fixtures/sample_iostat.output --disk sda --fig-output my-iostat.png \\\n plot --subplots io_rqm iops\n```\n\n* show any range of date time\n * filter since 2018-06-13 14:11:00 with `--since`\n * filter until 2018-06-13 14:11:30 with `--until`\n\n```bash\n(venv) $ iostat-cli --data tests/fixtures/sample_iostat.output --disk sda --fig-output my-iostat.png \\\n --since 20180613141100 --until 20180613141130 plot --subplots await svctm\n```\n\n* show vertical lines into graph\n * 2018-06-13 14:11:10 and 2018-06-13 14:11:20 with `--vlines`\n\n```bash\n(venv) $ iostat-cli --data tests/fixtures/sample_iostat.output --disk sda --fig-output my-iostat.png \\\n --since 20180613141100 --until 20180613141130 plot --subplots await svctm --vlines 20180613141110 20180613141120\n```\n\n* show only CPU-related data\n\n```bash\n(venv) $ iostat-cli --data tests/fixtures/sample_iostat.output --disk sda --fig-output my-iostat.png \\\n plot --cpu-only\n```\n\n* show only one subplot, without CPU information\n\n```bash\n(venv) $ iostat-cli --data tests/fixtures/sample_iostat.output --disk sda --fig-output my-iostat.png \\\n plot --subplots await --without-cpu\n```\n\n* generate graph with custom title\n\n```bash\n(venv) $ iostat-cli --data tests/fixtures/sample_iostat.output --disk sda --fig-output my-iostat.png \\\n plot --title 'my custom test'\n```\n\n#### csv\n\n* output 2 csv files (iostat_cpu.csv and iostat_devices.csv)\n\n```bash\n(venv) $ iostat-cli --data tests/fixtures/sample_iostat.output --output iostat.csv csv\n(venv) $ ls iostat_*.csv\niostat_cpu.csv\t\tiostat_devices.csv\n(venv) $ head -n 3 iostat_*.csv\n==> iostat_cpu.csv <==\ndatetime,%user,%nice,%system,%iowait,%steal,%idle\n2018-06-13 14:10:50,0.47,0.0,0.24,0.18,0.0,99.11\n2018-06-13 14:10:51,3.07,0.0,0.66,0.09,0.0,96.18\n\n==> iostat_devices.csv <==\ndatetime,device,rrqm/s,wrqm/s,r/s,w/s,rMB/s,wMB/s,avgrq-sz,avgqu-sz,await,r_await,w_await,svctm,%util\n2018-06-13 14:10:50,sdd,0.07,45.88,1.57,0.59,0.08,0.18,246.55,0.26,121.04,1.28,436.94,2.07,0.45\n2018-06-13 14:10:50,sdh,0.07,45.78,1.59,0.6,0.08,0.18,245.64,0.22,101.97,1.17,367.51,1.89,0.41\n```\n\n### run iostat and logging the output\n\n* monitor iostat command running\n * almost the same as `iostat -yxmt 1 | tee my-iostat.log`\n\n```bash\n(venv) $ iostat-cli --output my-iostat.log --fig-output my-scatter.png monitor --iostat-args \"-yxmt 1\"\n...\n06/13/2018 10:11:07 PM\navg-cpu: %user %nice %system %iowait %steal %idle\n 0.94 0.00 0.03 0.00 0.00 99.03\n\nDevice: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util\nsda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00\n\n06/18/2018 10:11:08 PM\navg-cpu: %user %nice %system %iowait %steal %idle\n 0.16 0.00 0.06 0.00 0.00 99.78\n...\n\n(Ctrl + C) # stop to run iostat\n```\n\n```bash\n(venv) $ file my-iostat.log my-scatter.png\nmy-iostat.log: ASCII text\nmy-scatter.png: PNG image data, 1800 x 1300, 8-bit/color RGBA, non-interlaced\n```\n\nNOTE: Saving `my-scatter.png` is experimental feature when io-stat terminated, so it might fails to save the figure.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/t2y/iostat-tool", "keywords": "iostat", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "iostat-tool", "package_url": "https://pypi.org/project/iostat-tool/", "platform": "unix", "project_url": "https://pypi.org/project/iostat-tool/", "project_urls": { "Homepage": "https://github.com/t2y/iostat-tool" }, "release_url": "https://pypi.org/project/iostat-tool/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "parse and visualize iostat output", "version": "0.2.0" }, "last_serial": 4380538, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1706ebfc502269dfae730ca015ad3042", "sha256": "9324cfa934281e7e92a8d8a4d502f4cd8310e5e56a492fe078906be1c3c6b527" }, "downloads": -1, "filename": "iostat-tool-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1706ebfc502269dfae730ca015ad3042", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 294212, "upload_time": "2018-06-27T11:48:23", "url": "https://files.pythonhosted.org/packages/3c/da/d515e990c00ccd8a46b30a619ef4033771afba47aef85c3eb110ee7464ba/iostat-tool-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4555f0f36e41d116d90904b67210aae8", "sha256": "f99b6f284e9c5e4a02ae827b310a3911e8c2af0899a171e984e3986ba0a6ba07" }, "downloads": -1, "filename": "iostat-tool-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4555f0f36e41d116d90904b67210aae8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 294381, "upload_time": "2018-07-04T06:44:05", "url": "https://files.pythonhosted.org/packages/bd/b5/e9d3977170e208051c02fd64a0c47db166e1deaad037b7192a30bfedcf80/iostat-tool-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2989540806b588bc905b74b3c7bfb678", "sha256": "e4c0b948b92392371a4ed0af992c0105aab3744b3775ab3995810588a91036d4" }, "downloads": -1, "filename": "iostat-tool-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2989540806b588bc905b74b3c7bfb678", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 295332, "upload_time": "2018-10-16T08:16:53", "url": "https://files.pythonhosted.org/packages/fa/9d/da3a7666d05abcb29bfdf2004c7eaa1ffb454747d4a8f17c0178fadcb7de/iostat-tool-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2989540806b588bc905b74b3c7bfb678", "sha256": "e4c0b948b92392371a4ed0af992c0105aab3744b3775ab3995810588a91036d4" }, "downloads": -1, "filename": "iostat-tool-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2989540806b588bc905b74b3c7bfb678", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 295332, "upload_time": "2018-10-16T08:16:53", "url": "https://files.pythonhosted.org/packages/fa/9d/da3a7666d05abcb29bfdf2004c7eaa1ffb454747d4a8f17c0178fadcb7de/iostat-tool-0.2.0.tar.gz" } ] }