Python port of the Task Manager clone: TPageControl with two tabs (tab clicks need app-level hit handling, fixed tab-width 140). Processes tab is a live XProcessList from /proc (sortable PID / Program / User / Mem / CPU% columns, header clicks toggle the direction). Performance tab is XHistoryGraph (60 s CPU + memory), XCoreGrid (per-core), XUsageBar (Memory, Disk /, Swap), XStackBar (memory breakdown) and XNetGraph (live /proc/net/dev rates). Data sampled every 500 ms (GLib timeout); window repaints every 2 s (a full redraw is ~38 rows x 5 text calls plus the graphs, and repainting every tick burned ~40% of a core); the process list refreshes every 2 s. Python monitor widgets draw dark btop-style panels, so the window background is dark. Also fixes two XProcessList issues the app exposed: the columns were fixed offsets drawn for the 360px demo widget (a wide widget was mostly empty) -> width-relative fractions, same as the C++ widget, plus a v/^ sort marker in the header; and _read_processes opened /proc/<pid>/status for every process on every scan (671 ms CPU for 400 processes) -> RSS now comes from stat field 24 and the uid lookup is cached per (pid, starttime), so a warm scan is ~75 ms (9x faster).
74 KiB
1024x768px
74 KiB
1024x768px