2 Commits
Author SHA1 Message Date
lotherkandClaude Sonnet 5.5 8b6d56f572 dtactivity: each tab says what its graph colours are; stacked graphs scale to their total (t0091)
The same three paints meant different things on the four tabs (user/system/nice,
used/cached, read/write, receive/send) and nothing said which; each tab has a
"Graph: ..." line under its numbers now.  The Disk and Network graphs stack
read on write but were scaled to the larger of the two, so a second with both
could clip: they scale to the highest stacked column (Peak sums the two).
Seen in a PID-namespace session with a disk writer: the line fits under the
numbers, the red writes fill the height at the peak.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 05:21:56 +00:00
lotherkandClaude Sonnet 5.5 5ea507d4dc dtactivity: the activity window (t0091)
A table of the processes -- PID, name, user, % CPU since the last sample,
threads, real and virtual memory -- sorted by the column title you click; Show
(all, mine, system), a filter, Quit Process (asks; SIGTERM; Force Quit SIGKILL)
and Inspect; and under it four tabs, CPU, System Memory, Disk Activity and
Network, with the numbers and a three-minute history graph.  All of it through
McdeSys (processes, CPU times, memory, disk and network counters, signals, the
commits of 2026-11-14/15); no ps(1), no top(1).  New program: programs/
dtactivity (Makefile.am, programs/Makefile.am, configure.ac, PLIST line
dt/bin/dtactivity; make mcde-linux plist: ok).

Frugal, as t0080 asks: one timer, 2 s, only while the window is mapped and not
fully obscured.  Measured with strace -c -f -p for 15 s: 2349 system calls
visible, 0 unmapped (xdotool windowunmap), 0 with an override-redirect window
over the whole screen, 2365 shown again.  Control: an idle sleep gives the same
empty summary, a process that makes calls does not.

Quit Process measured against real processes in a PID namespace (unshare -rpf
--mount-proc: only the test session's processes exist, so neither the tests nor
the screenshot show the host's): Cancel leaves a process alive, Quit ends it, a
process that ignores SIGTERM survives Quit and is ended by Force Quit.  Filter
and column sorting seen in screenshots (the committed image is the CPU tab with
two busy loops and the 24 MB/s of a disk writer in the other tab).  Cross
compile for NetBSD (x86_64--netbsd-gcc -Wall -Wextra): no diagnostic.  The
"Cannot convert string mcde to type FontStruct" warning is the shared
*renderTable fallback: dtimage prints it too.

Not built: Show "with window", the global menu, Cmd+F and Cmd+1..5, the
administrator's way for another user's process (t0079; it says "belongs to
somebody else"), a legend for the graph colours, the dtappscan entry; the NetBSD
backends of the numbers were never run.  Sorting by clicking a header was not
exercised by a script (the layout was); the default sort (CPU, descending) is
what the screenshots show.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 05:20:01 +00:00