{"id":17991718,"url":"https://github.com/hakavlad/diskio2log","last_synced_at":"2025-04-04T04:16:38.173Z","repository":{"id":145292780,"uuid":"412576934","full_name":"hakavlad/diskio2log","owner":"hakavlad","description":"Monitor and log some current I/O metrics for selected block device","archived":false,"fork":false,"pushed_at":"2021-12-19T17:32:22.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T15:41:29.500Z","etag":null,"topics":["block-device","io","monitor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hakavlad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-01T18:25:22.000Z","updated_at":"2021-12-19T17:32:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd2fe088-41b4-4df0-81f5-fcf040b141c1","html_url":"https://github.com/hakavlad/diskio2log","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakavlad%2Fdiskio2log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakavlad%2Fdiskio2log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakavlad%2Fdiskio2log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hakavlad%2Fdiskio2log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hakavlad","download_url":"https://codeload.github.com/hakavlad/diskio2log/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247117762,"owners_count":20886439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["block-device","io","monitor"],"created_at":"2024-10-29T19:23:36.450Z","updated_at":"2025-04-04T04:16:38.152Z","avatar_url":"https://github.com/hakavlad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# diskio2log\n\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/hakavlad/diskio2log.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/hakavlad/diskio2log/alerts/)\n\nMonitor and log some current I/O metrics for selected block device.\n\n## Options\n\n```\n$ diskio2log -h\nusage: diskio2log [-h] [-d DEV] [-i INTERVAL] [-m MODE] [-l LOG]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -d DEV, --dev DEV     device name\n  -i INTERVAL, --interval INTERVAL\n                        interval in sec\n  -m MODE, --mode MODE  mode (1, 2, 3 or 4); default: 1\n  -l LOG, --log LOG     path to log file\n```\n\n# Usage\n\nRun the script at least with `-d` option.\n\nOutput example:\n```\n$ diskio2log --dev sdb --interval 10\nStarting diskio2log, block device: sdb, interval: 10.0s, mode: 1\nProcess memory locked with MCL_CURRENT | MCL_FUTURE | MCL_ONFAULT\n--\nR 0.0 MiB/s, await 0% | W 0.6 MiB/s, await 3% | util 0.9%\nR 0.0 MiB/s, await 0% | W 0.6 MiB/s, await 4% | util 1.0%\nR 0.0 MiB/s, await 0% | W 0.0 MiB/s, await 0% | util 0.1%\nR 0.1 MiB/s, await 11% | W 0.6 MiB/s, await 6% | util 5.5%\nR 5.5 MiB/s, await 472% | W 0.0 MiB/s, await 1% | util 75.2%\nR 3.8 MiB/s, await 322% | W 0.0 MiB/s, await 3% | util 97.0%\nR 5.0 MiB/s, await 320% | W 0.0 MiB/s, await 0% | util 87.3%\nR 2.4 MiB/s, await 155% | W 0.0 MiB/s, await 0% | util 33.5%\nR 3.1 MiB/s, await 102% | W 0.0 MiB/s, await 1% | util 39.1%\nR 13.8 MiB/s, await 2253% | W 0.0 MiB/s, await 9% | util 99.0%\nR 6.2 MiB/s, await 390% | W 0.0 MiB/s, await 1% | util 76.0%\n^C--\nI/O statistics for sdb in the last 113.2s:\n  Read:\n    404.9 MiB (avg 3.6 MiB/s)\n    9063 requests processed (avg 80.0 rp/s)\n    1748 requests merged with in-queue I/O (avg 15.4 rm/s)\n    await 407.5s (avg 359.9%)\n  Write:\n    19.3 MiB (avg 0.2 MiB/s)\n    210 requests processed (avg 1.9 rp/s)\n    60 requests merged with in-queue I/O (avg 0.5 rm/s)\n    await 2.9s (avg 2.6%)\n  Utilization: 52.7s (avg 46.5%)\n```\n\n## Requirements\n\n- Linux kernel with `/proc/diskstats` available\n- Python 3.3+\n\n## Installation\n\nInstall\n```\n$ git clone https://github.com/hakavlad/diskio2log.git\n$ cd diskio2log\n$ sudo make install\n```\n\nUninstall\n```\n$ sudo make uninstall\n```\n\n## Resources\n\n- [Block layer statistics in /sys/block/\\\u003cdev\\\u003e/stat](https://github.com/torvalds/linux/blob/master/Documentation/block/stat.rst)\n- [I/O statistics fields](https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/iostats.rst)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakavlad%2Fdiskio2log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhakavlad%2Fdiskio2log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhakavlad%2Fdiskio2log/lists"}