Files
g15stats/README.rst
T
Mikhail Yevchenko 7c06a8089d Add mixed-vendor GPU summary and fix startup heap corruption
Collect AMD amdgpu sysfs and optional NVIDIA nvidia-smi stats in the
background, auto-detecting supported adapters in PCI order and rotating
additional pairs alongside CPU/RAM. Explicit PCI selection and off mode
remain supported; missing metrics render as N/A.

Initialize the bitmap-only canvas locally instead of the ABI-dependent
libg15render initializer: the installed TTF-enabled renderer wrote an
8-byte FreeType pointer past the smaller bitmap-only allocation, corrupting
the heap before GPU threads started. Add collector, rendering and full-main
regression tests.
2026-09-07 17:06:32 +00:00

94 lines
4.9 KiB
ReStructuredText

G15STATS
========
A CPU/Memory/Swap/Network/Battery/Temperature/Fan Speed/CPU Frequencies usage meter for G15Daemon.
=======
Warning
=======
I'm discontinuing this after someone made a fuzz about a feature he decided he want a decade later.
And as far I am concerned, Arch Linux's AUR administrators find this behavior just fine, so I'm not wasting my efforts on this anymore.
I can still fix issues as I always did and help via mail, but keep in mind Arch Linux is impossible to be supported.
========
Features
========
* Summary Screen displays 4 or 5 indicators from CPU/Frequency/Memory/NET/Temperature/Fan Speed/Swap, along with current time.
* CPU Screen displays graphs of User/System/Nice and Idle time, along with LoadAVG and Uptime.
* Frequency Screen displays all CPU cores frequency with the total
* Memory Screen displays Memory Total & Free, and graph of Used vs Buffered+Cached Memory.
* Swap Screen displays Used, Free and Total swap space, along with the number of pages currently paged in/out.
* Network Screen displays Total bytes In/Out, history graph, Peak speed.
* Battery Status Screen displays battery charge data for up to three batteries
* Temperature Screen displays temperature status for available sensors
* Fan Speed Screen displays fan current speed for the available sensors
============
Requirements
============
- libgtop
GPU monitoring
--------------
The summary automatically collects ALL supported PCI addresses (amdgpu or nvidia),
including mixed vendors. ``--gpu dddd:bb:ss.f`` (alias ``-gpu``) selects
a card; ``--gpu off`` disables collection and restores the original layout.
``--gpu auto`` is the default. Intel, nouveau and radeon are not supported.
Missing metrics show N/A. No supported GPU in auto mode leaves the layout intact.
An explicitly selected missing card keeps an N/A column. Selection is at startup.
Each column shows vendor/index and PCI bus:slot.function, UTL %, U used VRAM, T total VRAM, and TEM in C on five
lines. VRAM uses explicit MiB/GiB units (TiB/PiB if needed), with one decimal.
One GPU retains summary labels and shortened graphs. Two GPUs appear together
beside compact CPU/RAM-used/RAM-total/SWP rows (plus GPU count in five-row mode).
RAM also has explicit units. More than two cycle in PCI-sorted pairs every five
seconds from startup; all continue collecting. NV1/AMD2-style indices are one-based
selected-inventory positions, mapped to full PCI addresses in startup diagnostics.
The 64-card bound fails explicitly on overflow. The bottom bar and other screens
are unchanged. AMD APU VRAM may mean its reserved
carveout, not all shared system memory.
AMD uses read-only PCI-device sysfs/hwmon files. NVIDIA uses the optional
``/usr/bin/nvidia-smi`` without a shell or SDK dependency. Independent AMD workers
and one PCI-keyed all-NVIDIA query wait two seconds between samples, with a shared
750ms NVIDIA deadline and per-card five-second cache expiry. Shutdown has one
one-second worker join/reap budget. Display refresh remains controlled by ``-r``. See README for
exact layout, interfaces and subprocess lifecycle details. Run as an ordinary user.
``make check`` covers GPU-off, single-card and multi-card native framebuffers.
Final GPU, vertical TOTAL and time-footer glyphs are checked against font bitmap
bits independently of the text renderer. See README for packed framebuffer
exports and ``tests/render-images.sh``, which generates verified native/nearest-8x
PNGs and narrow contact sheets without cropping the LCD area.
=======
Options
=======
| ``-i id``: Gather statistics from named interface (ie -i eth0).
| ``-d``: Run in background (daemonise).
| ``-nsa``: Scale network graphs against highest speed recorded. The default is to scale against the highest peak in the current graph
| ``-h``: Show help.
| ``-r seconds``: Set the refresh interval to seconds. The seconds must be between 1 and 300 (ie -r 20).
| ``-u``: Display unicore graphs only on the CPU screen.
| ``-t id``: Force to monitor temperature sensor id on start (ie -t 1). The id should point to sysfs path */sys/class/hwmon/hwmon<id>/device/temp1_input*. Default the sensor id is auto-detected.
| ``-f id``: Force to monitor fan speed sensor id on start (ie -f 1). The id should point to sysfs path */sys/class/hwmon/hwmon<id>/device/fan1_input*. Default the sensor id is auto-detected.
| ``-df``: Disable monitoring CPUs frequencies.
| ``-ir``: Enable the bottom info bar content rotate cycle over all available sensors.
| ``-vc``: The cpu cores will be calculated every time (for systems with the cpu hotplug).
| ``-gt id``: Show temperature <id> in place of the maximal one on the summary screen with the option -gt <id> (ie -gt 1). The id should point to sysfs path */sys/class/hwmon/hwmon../device/temp<id>_input*.
=====
Usage
=====
Once running, the separate screens can be switched to as follows:
| ``L2``: Previous Screen
| ``L3``: Next Screen
| ``L4``: Alternative Screen (Doesn't work on Swap, Memory and Battery Screen)
| ``L5``: Bottom Info bar mode