Skip to content

Commit 795d2f7

Browse files
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/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
### 1.4.0
2+
* Read the GPU temperature from the GPU. The default sensor path for both CPU and
3+
GPU was thermal_zone0, a motherboard sensor, so the GPU row duplicated the CPU
4+
row on every install. NVIDIA cards are read via nvidia-smi, AMD and Intel via
5+
their hwmon entries.
6+
* Detect the CPU sensor rather than defaulting to thermal_zone0, preferring the
7+
on-die sensor (coretemp/k10temp package temperature).
8+
* Fix CPU usage calculation. It counted iowait as busy time and omitted nice, irq
9+
and softirq, so a slow disk read as CPU load while real work went uncounted.
10+
* Count network traffic on physical interfaces only. Loopback, VPN and Tailscale
11+
interfaces were included, so traffic through a VPN was counted twice, once on
12+
the tunnel and again on the hardware carrying it.
13+
* Fix network rate units. Bytes were divided by milliseconds and labelled KB, and
14+
the per-second part was missing from the label.
15+
* Add a refresh interval setting, defaulting to the previous 1 second.
16+
* Only build the settings object once. It was rebuilt on every settings change,
17+
leaving the previous bindings live and doubling the work each time.
18+
119

220
### 1.3.1
321
* Update default scale value to 2

0 commit comments

Comments
 (0)