Skip to content

README refresh, kernel-thread toggle, persistent settings, privileges guide (#1, #2, #3)#42

Merged
rezdm merged 4 commits into
mainfrom
feature/readme-kthreads-layout
Jun 12, 2026
Merged

README refresh, kernel-thread toggle, persistent settings, privileges guide (#1, #2, #3)#42
rezdm merged 4 commits into
mainfrom
feature/readme-kthreads-layout

Conversation

@rezdm

@rezdm rezdm commented Jun 12, 2026

Copy link
Copy Markdown
Owner

README refresh

Full Features section (I/O columns, history + Top Consumers + CSV export, find-open-file, single-instance raise), GUI and TUI key tables, TUI-only build flag, Solaris system-ncurses recipe, memory-footprint guidance (#5 analysis), Ctrl+Shift+Esc GNOME binding (#3).

Issue #2 — show/hide kernel threads

  • ProcessInfo.is_kernel_thread set per platform: Linux stat-flags PF_KTHREAD (no cmdline heuristics, zombies not misclassified), FreeBSD P_KPROC, Solaris SSYS
  • GUI: View → Show Kernel Threads; TUI: u key
  • Hidden kernel subtrees skipped in rendering, keyboard navigation and search in both UIs

Issue #1 — persist UI layout/settings

  • New Settings core service: key=value file at ~/.config/pex/pex.conf (XDG-aware); whole file loaded and rewritten, so GUI and TUI share it without clobbering each other's keys
  • GUI persists window size, refresh interval, tree/list mode, system panel, kernel toggle (window/table layout already persisted via imgui.ini)
  • TUI persists system panel state and kernel toggle

PRIVILEGES.md (new, linked from README)

Recipe-style per-OS guide for elevated permissions: Linux setcap (plain + group-restricted), Solaris RBAC profile + pfexec (complete recipe incl. the exec_attr lines the old README snippet was missing) + per-user defaultpriv, FreeBSD sudo/doas with X11 caveats, and setuid documented as the discouraged nuclear alternative.

Verification

  • Zero-warning builds on Linux (WSL) and real Solaris 11.4 hardware (incl. a fix for the <sys/proc.h>/fs-alias clash, SSYS value verified against the system header)
  • Settings round-trip tested on both: toggle → quit → pex.conf written → next run loads it
  • Multi-platform CI green (Ubuntu, Debian, FreeBSD, Solaris)

Closes #1
Closes #2

🤖 Generated with Claude Code

rezdm and others added 4 commits June 12, 2026 05:53
README: document all current features (I/O columns, history + Top
Consumers + CSV export, find-open-file, single-instance raise), add GUI
and TUI key tables, TUI-only build and Solaris system-ncurses notes,
memory-footprint guidance, and the Ctrl+Shift+Esc GNOME binding (#3).

Issue #2 - show/hide kernel threads:
- ProcessInfo.is_kernel_thread set per platform: Linux stat flags
  PF_KTHREAD, FreeBSD ki_flag P_KPROC, Solaris psinfo pr_flag SSYS
- GUI: View > Show Kernel Threads checkbox; TUI: 'u' key
- Hidden kernel subtrees are skipped in tree/list rendering, keyboard
  navigation and search in both UIs

Issue #1 - persist UI layout/settings:
- New Settings core service: key=value file at ~/.config/pex/pex.conf
  (XDG-aware); whole file is loaded and written back, so the GUI and TUI
  share it without clobbering each other's keys
- GUI persists window size, refresh interval, tree/list mode, system
  panel visibility, kernel-thread toggle (per-window/table layout was
  already persisted by imgui.ini)
- TUI persists system panel visible/expanded and the kernel-thread toggle

Verified in WSL Debian: clean build, zero warnings; scripted TUI session
toggles kernel threads, quits, and the next run loads the persisted
pex.conf (round-trip confirmed).

Closes #2
Closes #1

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Use the SSYS constant value directly (verified 0x00000001 on Solaris
11.4) instead of including <sys/proc.h>, which declares an entity named
'fs' that collides with the std::filesystem namespace alias.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…m README

Recipe-style instructions (exact commands, config files, verification):
- Linux: Option 1 plain setcap, Option 2 setcap + execute-group
  restriction for shared machines; cap_kill documented as optional;
  why setcap beats sudo for the GUI on Wayland; hidepid note
- Solaris: Option 1 RBAC execution profile + pfexec (complete recipe
  including the exec_attr.d lines the old README snippet was missing,
  with profiles/ppriv verification), Option 2 per-user defaultpriv
- FreeBSD: sudo/doas recipes (incl. doas.conf line) and the XAUTHORITY
  handling for the X11 GUI; see_other_uids footnote
- Baseline documented: pex runs unprivileged with reduced detail

README: setcap line now points to PRIVILEGES.md; the incomplete Solaris
RBAC snippet replaced with a link.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Recipe plus the honest cost analysis: pex holds root for its whole
lifetime (privileged reads every tick), which puts the DNS resolver,
ncurses, and the GL stack at euid 0. Zero gain over setcap/RBAC on
Linux/Solaris; on FreeBSD, if used at all: pexc only, group-restricted
(chmod 4750). Notes setgid kmem + libkvm as the principled future
FreeBSD option.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rezdm rezdm merged commit 4627431 into main Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show/hide kernel threads Persist UI layout

1 participant