Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpu-gpu-daemon

A tiny system monitor for the GNOME top bar: CPU, GPU, RAM, temperature and disk usage shown to the left of the clock, refreshing once per second. Click the indicator to open Settings — change the refresh rate and choose which metrics to show.

Built for Fedora + GNOME 50 (Wayland) with an Intel Arc iGPU (xe driver), but the sources are standard Linux and it degrades gracefully on other hardware.

How it works

Two cooperating parts, because on Wayland only a GNOME Shell extension can put text in the top bar — and heavy sampling must not run inside gnome-shell:

Part Role
daemon/cpu_gpu_daemon.py A systemd --user service. Samples the system on an interval and writes a tiny JSON file to $XDG_RUNTIME_DIR/cpu-gpu-daemon/stats. All the heavy work (scanning /proc/*/fdinfo for GPU cycles) lives here, so the shell never stutters. Pure Python standard library — no GNOME dependencies.
extension/ The GNOME Shell extension (cpu-gpu-ram@park.local). Adds a label just left of the clock, reads the JSON file, and renders the metrics you enabled. Clicking it opens the preferences window.

The extension owns the configuration (GSettings) and mirrors the two values the daemon needs (interval, disk path) into ~/.config/cpu-gpu-daemon/daemon.json.

Metrics

Metric Source Meaning
CPU % /proc/stat Busy jiffies over the interval (idle + iowait subtracted)
GPU % /proc/*/fdinfo drm-cycles-* (Intel xe) Busiest engine's utilization
RAM % /proc/meminfo MemTotal − MemAvailable (reclaimable cache is not counted as used)
Temp °C /sys/class/hwmon (coretemp / k10temp package sensor) CPU package temperature
Disk % statvfs of the configured mount Used space, df-style

GPU % is computed from each client's cycle delta divided by the global timestamp delta. This avoids the RC6 idle-residency method's large overestimate (which reported ~68 % at idle where the real figure is ~2 %).

Install

git clone https://github.com/parkkarl/cpu-gpu-daemon.git
cd cpu-gpu-daemon
./install.sh

install.sh compiles the settings schema, installs and starts the systemd --user daemon, and symlinks + enables the extension.

Wayland note: a brand-new extension is only picked up by a fresh session. If install.sh prints that it could not enable the extension yet, log out and back in once — it then starts automatically (it is already registered in enabled-extensions).

Settings

Click the indicator in the top bar (or run gnome-extensions prefs cpu-gpu-ram@park.local):

  • Refresh interval — 1–60 seconds (applies to both the display and the daemon's sampling).
  • Metrics — toggle CPU, GPU, RAM, Temperature, Disk individually.
  • Disk mount path — which filesystem the disk % refers to (default /).
  • Text labels — show CPU/GPU/… before each value, or just the numbers.

Manage

systemctl --user status cpu-gpu-daemon.service     # daemon state
journalctl --user -u cpu-gpu-daemon.service -f     # daemon log
cat "$XDG_RUNTIME_DIR/cpu-gpu-daemon/stats"         # raw sampled values
gnome-extensions disable cpu-gpu-ram@park.local     # hide the indicator

Uninstall

./uninstall.sh

License

MIT — see LICENSE.

About

GNOME top-bar monitor: CPU, GPU (Intel xe), RAM, temperature and disk usage left of the clock, with a settings panel (refresh rate + which metrics to show).

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages