-
Notifications
You must be signed in to change notification settings - Fork 38
feat(system_monitor): Add Network and Disk I/O metrics for complete observability #47
Copy link
Copy link
Open
Description
Add Network and Disk I/O monitoring capabilities to the system monitor for complete observability of system resources.
Motivation
Currently, the system monitor only tracks CPU, memory, and GPU usage. For real-time applications and performance monitoring, network and disk I/O metrics are essential to understand:
- Network throughput (upload/download rates)
- Disk activity (read/write rates)
- Potential I/O bottlenecks
Proposed Solution
Add the following metrics to system_monitor.rs:
Network I/O
get_network_tx_rate()— Network transmission rate (bytes/sec)get_network_rx_rate()— Network receive rate (bytes/sec)get_network_total_rate()— Combined network I/O rateformat_network_rate()— Human-readable formatting (KB/s, MB/s, GB/s)
Disk I/O
get_disk_read_rate()— Disk read rate (bytes/sec)get_disk_write_rate()— Disk write rate (bytes/sec)get_disk_total_rate()— Combined disk I/O rateformat_disk_rate()— Human-readable formatting
Implementation Details
- Use
sysinfocrate'sNetworksandDisksAPIs - Calculate rates by measuring delta between snapshots
- Store rates in atomic variables for thread-safe access
- Add helper structs
NetworkSnapshotandDiskSnapshot
Related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels