diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 138 |
1 files changed, 16 insertions, 122 deletions
@@ -63,45 +63,33 @@ in the source, so no real location appears in committed files. ## System widgets -Seven cards cover the machine itself: - -- **System**: CPU load as a per-core equaliser, the CPU and motherboard model - as two rows under the header, RAM used/total, and every temperature (CPU - package, CCD die, NVMe and two board sensors). -- **GPU**: Arc B580 package and VRAM temperatures, VRAM in use as a bar, and - fan speed. -- **Disks**: `/`, `/home`, `/data` and one NFS mount per server, as usage - rings, with free space and total size printed under each ring. Two servers - are configured, each with the same export mounted twice; the card shows one - mount per server so no number appears twice. +Three cards cover the machine itself: + - **Cache**: `~/.cache` total and its four largest subdirectories. -- **Network**: LAN and public address, and download/upload throughput as two - lines on one chart. See below. - **Slackware**: distribution version, package count, kernel, install age, and time since the last `slackpkg` ChangeLog update. See below. - **Updates**: nvtable's table of tracked packages behind upstream, scrolled with the mouse wheel. See below. -The disks and cache cards read a cache file that a sampler writes; they never -call `du` or `statfs` themselves. `statfs` on an unreachable NFS path blocks, -and the disks sampler exists so that a dead server costs a stale cache rather -than a frozen draw. Sampling is scheduled by conky itself: `conky.text` carries +CPU, RAM, temperatures, the GPU, disks, network and the public address used to +be cards here. They moved to the performance panel of the quickshell island +(`desktop/island/` in the quickshell repo), which also warns from the status +pill. The island keeps writing `~/.cache/udt/pubip.txt`. + +The cache card reads a cache file that a sampler writes; it never calls `du` +itself. Sampling is scheduled by conky itself: `conky.text` carries a threaded `${texeci}` per sampler, even though that block renders nothing under Cairo. ${texeci 900 ~/.config/conky/bin/weather-fetch.sh} - ${texeci 60 ~/.config/conky/bin/disks-sample.sh} ${texeci 900 ~/.config/conky/bin/cache-sample.sh} - ${texeci 1800 ~/.config/conky/bin/pubip-sample.sh} ${texeci 900 ~/.config/conky/bin/slackware-sample.sh} ${texeci 300 ~/.config/conky/bin/calendar-sample.sh} ${texeci 1800 ~/.config/conky/bin/immich-fetch.sh} ${texeci 600 ~/.config/conky/bin/updates-sample.sh} -The disks sampler runs once a minute; the cache, Slackware and public-IP -samplers run every 15, 15 and 30 minutes respectively, because `du -sh +The cache and Slackware samplers run every 15 minutes, because `du -sh ~/.cache` walks the tree and takes about 100ms warm, which is fine on a slow -cycle and unthinkable on the 2-second draw, and a residential public address -does not change often enough to warrant asking more frequently. The calendar +cycle and unthinkable on the 2-second draw. The calendar sampler runs every five minutes: khal costs about 200ms of Python startup, which rules out calling it from a draw, and the cache has to notice both a vdirsyncer run and the day rolling over. Tying them to @@ -109,9 +97,7 @@ conky means nothing samples while the dashboard is down. To run a sampler by hand: - ./bin/disks-sample.sh; echo "exit: $?" ./bin/cache-sample.sh; echo "exit: $?" - ./bin/pubip-sample.sh; echo "exit: $?" ./bin/slackware-sample.sh; echo "exit: $?" ./bin/calendar-sample.sh; echo "exit: $?" ./bin/updates-sample.sh; echo "exit: $?" @@ -119,38 +105,11 @@ To run a sampler by hand: All print nothing and exit 0 on success, and all write a temp file and rename it over the target, so the widget never reads a half-written file. -### Network - -The chart plots download and upload as two lines on **one shared vertical -scale**: scaled independently they would lie about their relative size, which -is the entire reason to draw them together. The window peak is printed at the -chart's top-left and the live rates at the bottom corners, each in its line's -colour. History is module state inside `widgets/network.lua`, one sample per -pixel column of the chart so it is exactly as wide as the card and never -interpolates; it does not survive a `restart.sh` or a conky restart, so the -chart starts empty and fills left to right. - -The rates come from the graphed interface's own byte counters under -`/sys/class/net`, read on every draw: two file reads, no subprocess. The LAN -address comes from `ip -4 addr show br0` and is memoized on first success, -retried while nil because a bridge may not be up yet when conky starts. The -public address comes from the cache file `bin/pubip-sample.sh` writes; once -that cache is older than four hours the card shows `--` instead, because an -address that may no longer be yours displayed with confidence is worse than a -dash. - -**`br0` is a bridge, not a physical interface**, and the `IFACE` constant at -the top of `widgets/network.lua` is the one edit that changes which interface -is graphed. VM-to-host traffic crosses a bridge without reaching the router, -so a local copy of that traffic appears in the chart. This carries over -unchanged from the previous text config and is accepted behaviour, not a bug. - ### Slackware The big top-right value is the time since `/var/lib/slackpkg/ChangeLog.txt` last changed, coloured `ok` under 24 hours, `warning` to a week, `critical` -beyond, the same three-role language the system, GPU, disks and cache cards -use. Below it: distribution version, package count, kernel, and install age +beyond, the same three-role language the cache card uses. Below it: distribution version, package count, kernel, and install age (the root filesystem's birth time, where the filesystem records one). ### Calendar @@ -236,43 +195,15 @@ at most every 30 minutes, detached so conky never waits on the network; its results show up on the next sample. `nvtable` is looked up in `~/bin` too, since conky launched by the compositor lacks the login shell's `PATH`. -### Host bindings - -These hwmon bindings, and the ceilings beside them, are specific to this machine -and will not port. They are written down because the alternative is -rediscovering them from a wrong reading. - -| chip | file | label | warning / critical | -|---|---|---|---| -| `k10temp` | `temp1_input` | CPU package | 75 / 90 | -| `k10temp` | `temp3_input` | CCD die | 75 / 90 | -| `nvme` | `temp1_input` | WD_BLACK SN850X | 60 / 70 | -| `xe` | `temp2_input` | Arc B580 package | 75 / 85 | -| `xe` | `temp3_input` | Arc B580 memory | 80 / 90 | -| `xe` | `fan1_input` | Arc B580 fan RPM | none | -| `gigabyte_wmi` | `temp2_input` | board | 60 / 70 | -| `gigabyte_wmi` | `temp3_input` | board | 60 / 70 | - -Chips are globbed by the contents of their hwmon `name` file, never by index: -indices drift across kernel and hardware reorders and a stale one silently -reports a different chip. `Tccd1` is read straight from sysfs rather than by -shelling out to `sensors`; same number, no subprocess. The `gigabyte_wmi` chip -exposes five unlabelled temperatures, two of which the old conky config showed; -they are labelled "board" rather than given a meaning they may not have. - ### One colour language across every card Anything with a comfortable range and an uncomfortable one is coloured by the same three roles, so a card reads without learning a new scheme: `ok` below the first threshold, `warning` between them, `critical` above the second. -Filesystems, cache usage and CPU load use 25% and 75%. Temperatures use a -per-sensor pair (the table above), because 70C is unremarkable on a CPU package -and alarming on an NVMe. The Slackware card's ChangeLog age uses the same +Cache usage uses 25% and 75%. The Slackware card's ChangeLog age uses the same three roles on an hour scale (24 / 168) instead of a percentage. These are -starting values, host-specific exactly as the -bindings are, and sit in one table per widget so they are easy to retune once -real numbers under load are known. +starting values, and sit in one table per widget so they are easy to retune. ## Changing the layout @@ -336,9 +267,9 @@ cell is left sparse; size it off the height alone and a short cell shrinks the text to a whisper. The robust way is a measured fit: `card.fit_unit()` returns the largest base size at which every row still fits the width, and the widget takes the smaller of that and its height budget. Larger cell, larger type; a row -that would collide pulls the size back down. The GPU, cache and system cards do +that would collide pulls the size back down. The cache card does this. A card that cannot afford the measuring pass can still key off width with -a clamp, `math.max(lo, math.min(hi, inner.w * k))`; the clock, weather and disks +a clamp, `math.max(lo, math.min(hi, inner.w * k))`; the clock and weather cards do. **Decide where the slack goes, and let one element absorb it.** The clock pins @@ -443,9 +374,6 @@ widget passes its own. The clock uses `FONT_CLOCK` (Oswald, OFL-1.1, under substitutes a default for a name it does not know, which looks exactly like the font "not applying". -**Sensors are globbed by hwmon `name`, never by index.** Indices drift across -kernel and hardware reorders, and a stale one silently reports a different chip. - **`${execi}` fires even though `conky.text` renders nothing.** Cairo output covers the text stream, so the `execi` that refreshes the weather cache is invisible, but it still runs on schedule. This was checked with a probe config @@ -475,40 +403,6 @@ half empty. Fill the cell instead: `card.fit_unit()` measures the rows and returns the largest size that fits the width, the widget takes the smaller of that and its height budget, and a row that would collide pulls the size down. -**A bare `df` would silently mis-read every disk figure.** The user's shell -aliases `df` to `df -h`, so `bin/disks-sample.sh` calls `/usr/bin/df -P -B1` by -absolute path. `-P` is the POSIX format, one line per filesystem with the -mountpoint last, and `-B1` is bytes so the parser never interprets a suffix. An -alias or a function would hand the parser `1.6G` where it expects an integer, -and every figure would be quietly wrong. - -**The disks card shows `df`'s available column, not `size - used`.** On this -machine's root filesystem the two differ by about 13GB of root-reserved -blocks, which exist on disk but are not available to any non-root user. A -card that computed free space as `size - used` would overstate it by exactly -that reserve. - -**The Arc B580 reports no utilisation through any stable interface.** The `xe` -driver exposes no `gpu_busy_percent` (unlike `amdgpu`) and `intel_gpu_top` -refuses the device. The GPU card therefore has no load bar; it shows what the -hardware actually reports rather than inventing a number. - -**VRAM in use comes from DRM fdinfo**, the per-client counters `gputop` reads: -`drm-resident-vram0` in `/proc/<pid>/fdinfo/<fd>`, summed once per -`drm-client-id`. Only processes readable by conky's user are seen, so a GPU -client running as another user is not counted. The card's 12 GiB total is -hardcoded: xe puts no VRAM capacity in sysfs. - -**`/data` has no temperature.** It sits on a spinning disk with no hwmon chip; -reading its SMART temperature would need `smartctl` as root and would spin up a -sleeping disk on every poll. The NVMe composite temperature is freely readable -and is shown; `/data` simply has none. - -**Per-core counters are module-level in `widgets/system.lua`.** Load is a delta -between frames, so the counter has to outlive the draw; one created inside -`draw` would sample against nothing and report nil forever. The aggregate -counter is the same. - ## License GPLv2 only. See `LICENSE`. |
