Commit 795d2f7
committed
simple-system-monitor: fix GPU and CPU sensors, CPU usage and network rates
The GPU temperature was read from thermal_zone0, the same motherboard sensor
used for the CPU, so the GPU row showed the CPU value on every install. It is
now read from the GPU itself: nvidia-smi for NVIDIA, hwmon for AMD and Intel.
The CPU sensor is likewise detected rather than defaulting to thermal_zone0,
preferring the on-die package sensor.
CPU usage counted iowait as busy time and left out nice, irq and softirq, so a
slow disk showed as CPU load while real work went uncounted. It is now measured
as the share of time that is neither idle nor waiting on I/O.
Network traffic was summed over every activated interface including loopback and
any VPN, so traffic through a tunnel was counted twice, once on the tunnel and
again on the hardware carrying it. Only physical interfaces are counted now. The
rate itself divided bytes by milliseconds and labelled the result KB, and the
label was missing the per-second part.
The refresh interval becomes a setting, keeping 1 second as the default. GPU
temperature is polled no more than once every 2 seconds since it costs a
subprocess.
The settings object was rebuilt on every settings change while the previous
bindings stayed live, so each change cost more than the one before it.1 parent 7bbbef3 commit 795d2f7
4 files changed
Lines changed: 261 additions & 83 deletions
File tree
- simple-system-monitor@ariel
- files/simple-system-monitor@ariel
- 5.8
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
1 | 19 | | |
2 | 20 | | |
3 | 21 | | |
| |||
0 commit comments