Expand description
Per-process CPU and memory, read without elevation (SPEC_TOWER_TASK_MANAGER_PANE_2026_10_08.md §3, §4).
One snapshot lists every process this user may see, with what the OS
reports for it:
| OS | Source | Other users’ processes |
|---|---|---|
| Windows | one NtQuerySystemInformation(SystemProcessInformation) call | full (no per-process handle is opened) |
| Linux | /proc/<pid>/stat + status | full, unless /proc is mounted hidepid |
| macOS | proc_listallpids + proc_pid_rusage | name and parent only: CPU and memory are None |
Nothing here asks for a privilege: no SeDebugPrivilege, no
task_for_pid, no CAP_SYS_PTRACE. A value the OS won’t give us is
None, never 0.
CPU is a cumulative time; RateMeter turns two samples into a rate.
Structs§
- Proc
Info - One process, as the OS reported it at the moment of the snapshot.
- ProcKey
- A process’s identity across snapshots.
- Rate
Meter - Turns cumulative CPU times into rates: the fraction of one core used since the previous round (1.0 = one core fully busy).
Constants§
Functions§
- base_
name - The executable name in a path, without directory (either separator).
- command_
line - A process’s full command line, read on demand (it may hold secrets, so it
is never part of a
snapshot).Nonewhen it has exited or the OS won’t say. - command_
line_ of - The command line of exactly the process
keynames:Noneif it has exited or a newer process has its PID, checked both before and after the read, so a PID reused in between never hands back the successor’s line. - cpu_
count - Logical CPUs on the whole machine — what “percent of the machine” divides by (every processor group on Windows).
- is_
running - Whether the process
keynames is still the one running under its PID (it hasn’t exited, and no newer process has reused the PID). Check it before and after reading anything about a process by PID. - snapshot
- Every process this user may see. Processes that exit mid-read are left out.