Files
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

120 lines
4.6 KiB
Groff

.\" Imported from Debian 1.9.2-2; see debian/PROVENANCE for attribution.
.TH "g15stats" "1" "7 September 2026" "G15Daemon - g15stats" "G15Daemon User Manual"
.SH "NAME"
g15stats \- system statistics display client for G15Daemon
.SH "SYNOPSIS"
.B g15stats
.RI [ options ]
.SH "DESCRIPTION"
The program provides usage meters for the LCD on
supported Logitech keyboards, using g15daemon:
.PP
CPU Screen displays graphs of User/System/Nice and Idle time, along with
LoadAVG and Uptime.
.PP
Memory Screen displays Memory Total & Free, and graph of Used vs
Buffered+Cached Memory.
.PP
Swap Screen displays Used, Free and Total swap space, along with the number
of pages currently paged in/out.
.PP
Network Screen displays Total bytes In/Out, history graph, Peak speed.
.PP
The summary, CPU frequency, battery, temperature and fan screens display
additional statistics where the relevant system sensors are available.
.SH "OPTIONS"
g15stats understands the following options:
.TP
.BI "\-gpu, --gpu " "auto|off|dddd:bb:ss.f"
Select the GPU summary columns. Default auto collects all PCI addresses
bound to amdgpu or nvidia at startup, including mixed vendors; off disables collection and retains
the original layout. A PCI address selects one card explicitly.
No supported card in auto mode leaves the original layout intact; an explicit
missing card shows N/A. Restart after hotplug to rediscover devices.
Intel, nouveau and radeon are not supported.
.br
.P
.HP
\-h,--help show usage information.
.P
.HP
\-d,--daemon run in background.
.P
.HP
\-i,--interface [interface] monitor network interface [interface] ie -i eth0.
.P
.HP
\-nsa,--net-scale-absolute scale net graphs against maximum speed seen.
.TP
.BR \-u , " --unicore"
Display unicore graphs on the CPU screen.
.TP
.BI "\-r, --refresh " seconds
Set the refresh interval from 1 to 300 seconds (default: 1).
.TP
.BI "\-t, --temperature " id
Select the temperature hwmon sensor (0 to 3).
.TP
.BI "\-f, --fan " id
Select the fan hwmon sensor (0 to 3).
.TP
.BI "\-gt, --global-temp " id
Show this temperature probe instead of the maximum on the summary screen.
.TP
.BR \-df , " --disable-freq"
Disable CPU frequency monitoring.
.TP
.B --info-rotate
Rotate the bottom information bar. Use the long option: the fork documents
\-ir in its help, but its parser checks \-rc and also treats that prefix as
\-r. The documented short form \-ir is not supported correctly.
.TP
.BR \-vc , " --variable-cpu"
Recalculate the CPU count for systems supporting CPU hotplug.
.SH "KEYS"
L2 selects the previous screen; L3 selects the next screen.
L4 selects an alternative view where available; L5 changes the bottom bar.
.SH "NOTES"
Each GPU column shows vendor/index and PCI bus:slot.function, UTL percent,
U used VRAM, T total VRAM, and TEM in C.
Used and total occupy separate rows with explicit MiB/GiB units (TiB/PiB
if needed), rounded to one decimal. On AMD APUs VRAM can mean only the reserved
carveout. With one GPU the summary retains its 4/5 indicators and shortened
graphs. With two GPUs both columns appear together beside compact CPU percent,
R used system RAM, T total system RAM and SWP percent (plus GPU count in five-row
mode). RAM has explicit units too. More than two cycle in PCI-sorted pairs every
five seconds from startup; all cards continue collecting. NV1/AMD2-style indices
are one-based selected-inventory positions, not NVIDIA ordinals; startup diagnostics
map them to full PCI addresses. The 64-card bound fails explicitly on overflow.
The bottom bar and other screens are unchanged. See README for pixel coordinates.
.PP
AMD reads device-local sysfs/hwmon metrics. NVIDIA optionally uses
/usr/bin/nvidia-smi with no shell or SDK dependency. Independent AMD workers and
one batched NVIDIA worker wait two seconds between queries. All NVIDIA cards
share one PCI-keyed query with a 750ms deadline;
timeouts kill the child, and an unreaped child prevents additional launches.
The child is also killed on parent death. Data older than five seconds and
unavailable metrics show N/A, never fabricated zero. Display refresh remains
controlled by the refresh option. Worker shutdown has one shared one-second
join/reap budget; a stuck kernel read can outlive it until process exit.
No GPU settings are written.
.PP
Normal operation requires a running g15daemon. This package does not install
or enable a g15stats service. Run the client as an ordinary user.
The help options exit before connecting to g15daemon.
Sensor availability depends on the kernel and hardware; legacy battery
paths may be unavailable on modern systems.
.SH "AUTHOR"
Mike Lampard
.SH "SEE ALSO"
.BR g15daemon (1),
.BR libg15 (3)