Network and Disk I/O Stats Monitor
Project description
iometrics
Network and Disk I/O Stats Monitor.
Usage
Monitor and log Network and Disks statistics in MegaBytes per second.
Pytorch-lightning integration
# TODO: add a pytorch-lightning integration example
Pure-Python implementation
Quick check:
python -c 'import iometrics; iometrics.usage()'
Full code:
import time
from iometrics import NetworkMetrics, DiskMetrics, DUAL_METRICS_HEADER
net = NetworkMetrics()
disk = DiskMetrics()
for i in range(100):
time.sleep(1)
net.update_stats()
disk.update_stats()
print(DUAL_METRICS_HEADER) if i % 15 == 0 else None
row = (
f"| {net.mb_recv_ps.val:6.1f} | {net.mb_recv_ps.avg:6.1f} "
f"| {net.mb_sent_ps.val:5.1f} | {net.mb_sent_ps.avg:5.1f} "
f"| {int(disk.io_util.val):3d} | {int(disk.io_util.avg):3d} "
f"| {disk.mb_read.val:6.1f} | {disk.mb_read.avg:6.1f} "
f"| {disk.mb_writ.val:5.1f} | {disk.mb_writ.avg:5.1f} "
f"| {int(disk.io_read.val):4d} | {int(disk.io_read.avg):4d} "
f"| {int(disk.io_writ.val):3d} | {int(disk.io_writ.avg):3d} "
f"|"
)
print(row)
Example output
| Network (MBytes/s) | Disk Util | Disk MBytes | Disk I/O |
| Received | Sent | % | MB/s Read | MB/s Written | I/O Read | I/O Write |
| val | avg | val | avg | val | avg | val | avg | val | avg | val | avg | val | avg |
| ------:| ------:| -----:| -----:| ---:| ---:| ------:| ------:| -----:| -----:| ------:| ------:| ---:| ---:|
| 4.6 | 3.5 | 0.1 | 0.1 | 49 | 2 | 52.8 | 1.1 | 0.0 | 0.9 | 211 | 4 | 5 | 18 |
| 4.1 | 3.5 | 0.1 | 0.1 | 61 | 3 | 60.4 | 2.4 | 40.3 | 1.7 | 255 | 10 | 149 | 21 |
Contributing
See CONTRIBUTING.md
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
iometrics-0.0.1.tar.gz
(10.5 kB
view details)
Built Distribution
iometrics-0.0.1-py3-none-any.whl
(11.8 kB
view details)
File details
Details for the file iometrics-0.0.1.tar.gz
.
File metadata
- Download URL: iometrics-0.0.1.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.8.11 Linux/5.11.0-25-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f63b71a7bf0b3ad8c161dc1fc97580569f01a8cfa6fda0f699013c269cc428ab |
|
MD5 | e9915587701e6fdd31ba7c4f90ea073b |
|
BLAKE2b-256 | b373e4088d8898f0db7f110b05481e5b939b67b7cbe267e5e5234b4cda7ef911 |
File details
Details for the file iometrics-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: iometrics-0.0.1-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.8.11 Linux/5.11.0-25-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a673b3791f50763413da17019e915ea8618d5dc21ca3c207db580d69a5bfd31 |
|
MD5 | 65a8c2a3888fae2e0f326b7ad5ded77e |
|
BLAKE2b-256 | cf380d4de885feeb133cc11c7fabf39acc0a0cac7589700eca15ddc61c9ed1f7 |