From 97f778b1b40cf19ae0702ec7e7183a391870d8de Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Wed, 22 Nov 2023 21:03:43 -0800 Subject: [PATCH] more power fixes, man page --- pinxi | 38 +++++++++++++++++++++----------------- pinxi.1 | 50 +++++++++++++++++++++++++++++++++++--------------- 2 files changed, 56 insertions(+), 32 deletions(-) diff --git a/pinxi b/pinxi index 67f7a25..ee30e6c 100755 --- a/pinxi +++ b/pinxi @@ -50,8 +50,8 @@ use POSIX qw(ceil uname strftime ttyname); ## INXI INFO ## my $self_name='pinxi'; my $self_version='3.3.31'; -my $self_date='2023-11-21'; -my $self_patch='15'; +my $self_date='2023-11-22'; +my $self_patch='16'; ## END INXI INFO ## my ($b_pledge,@pledges); @@ -6052,11 +6052,11 @@ sub show_options { ID, position (if > 1), resolution, dpi, model, diagonal; APIs: EGL: per platform report; OpenGL: ES version, device-ID, display-ID (if not found in Display line); Vulkan: per device report."], - ['2', '-I', '', "Adds wakeups: (from suspend) to Uptime; other detected - installed gcc versions (if present). System default target/runlevel. Adds - parent program (or pty/tty) for shell info if not in IRC. Adds Init version - number, RC (if found). Adds per package manager installed package counts (if - not -r)."], + ['2', '-I', '', "Adds Power: with children uptime, wakeups (from suspend); + other detected installed gcc versions (if present). System default + target/runlevel. Adds parent program (or pty/tty) for shell info if not in + IRC. Adds Init version number, RC (if found). Adds per package manager + installed package counts (if not -r)."], ['2', '-j,-p,-P', '', "Swap priority."], ['2', '-J', '', "Vendor:chip-ID; lanes (Linux only)."], ['2', '-L', '', "Show internal LVM volumes, like raid image/meta volumes; @@ -6098,9 +6098,10 @@ sub show_options { ['2', '-G', '', "Device serial number, class ID; Xorg Screen size, diag; Monitors: hz, size, modes, serial, scale, modes (max/min); APIs: EGL: hardware driver info; Vulkan: layer count, device hardware vendor."], - ['2', '-I', '', "For 'Shell:' adds ([doas|su|sudo|login]) to shell name if - present; adds default shell+version if different; for 'running in:' adds (SSH) - if SSH session."], + ['2', '-I', '', "For Power:, adds states, suspend/hibernate active type; + For 'Shell:' adds ([doas|su|sudo|login]) to shell name if present; adds + default shell+version if different; for 'running in:' adds (SSH) if SSH + session."], ['2', '-J', '', "If present: Devices: serial number, interface count, max power."], ['2', '-m,--memory-modules', '', "Width of memory bus, data and total (if @@ -6110,9 +6111,10 @@ sub show_options { ['2', '-R', '', "zfs-raid: portion allocated (used) by RAID devices/arrays. md-raid: system md-raid support types (kernel support, read ahead, RAID events). Hardware RAID rev, ports, specific vendor/product information."], - ['2', '-S', '', "Kernel clocksource; Panel/tray/bar/dock info in desktop - output, if in X (like lxpanel, xfce4-panel, mate-panel); (if available) dm - version number, window manager version number, virtual terminal number."], + ['2', '-S', '', "Kernel clocksource; if in non console wm/desktop, and if + available: panel/tray/bar/dock info (like lxpanel, xfce4-panel, mate-panel); + window manager version number; virtual terminal number; tools item with + screensavers/lockers running; dm version number."], ); if ($use{'weather'}){ push(@$rows, @@ -6145,8 +6147,10 @@ sub show_options { device(s) (if available); Monitor built year, gamma, screen ratio (if available); APIs: OpenGL: device memory, unified memory status; Vulkan: adds full device report, device name, driver version, surfaces."], - ['2', '-I', '', "Adds to Packages total number of lib files found for each - package manager and pm tools (if not -r); adds init service tool."], + ['2', '-I', '', "Adds to Power suspend/hibernate available non active states, + hibernate image size, suspend failed totals (if not 0); Packages total number + of lib files found for each package manager and pm tools (if not -r); adds + init service tool."], ['2', '-j,-p,-P', '', "For swap (if available): swappiness and vfs cache pressure, and if values are default or not."], ['2', '-j', '', "Linux only: (if available): row one zswap data, and per zram @@ -6164,8 +6168,8 @@ sub show_options { percent available for user, block size of file system (root required)."], ['2', '-r', '', "Packages, see -Ia."], ['2', '-R', '', "mdraid: device maj:min; per component: size, maj:min, state."], - ['2', '-S', '', "If available: kernel alternate clocksources, boot - parameters."], + ['2', '-S', '', "If available: kernel alternate clocksources, boot parameters; + screensaver/locker tools available but not active."], ['2', '', '--slots', "If available: slot bus ID children."], ); push(@$rows, diff --git a/pinxi.1 b/pinxi.1 index 86d048a..bbe4891 100644 --- a/pinxi.1 +++ b/pinxi.1 @@ -1692,9 +1692,10 @@ did not find an X11 display ID, the ID (e.g. \fB:0.0\fR) will show here instead. .TP .B \-xx \-I\fR -\- For \fBUptime:\fR adds \fBwakeups:\fR to show how many times the machine -has been woken from suspend state during current uptime period (if available, -Linux only). 0 value means the machine has not been suspended. +\- Addes \fBPower:\fR parent for power data children \fBuptime:\fR and adds +\fBwakeups:\fR. Wakeups shows how many times the machine has been woken from +suspend state during current uptime period (if available, Linux only). 0 value +means the machine has not been suspended. \- Adds init type version number (and rc if present). @@ -1890,6 +1891,11 @@ displayed if device name is present with \fB\-a\fR). .TP .B \-xxx \-I\fR +\- For \fBPower:\fR adds supported system power \fBstates:\fR, active +\fBsuspend:\fR type, active \fBhibernate:\fR type. See +\fIhttps://www.kernel.org/doc/html/v4.15/admin-guide/pm/sleep-states.html\fR +for full explanation of states and actions. + \- For \fBShell:\fR adds \fB(su|sudo|login)\fR to shell name if present. \- For \fBShell:\fR adds \fBdefault:\fR shell if different from @@ -1956,12 +1962,16 @@ and many others. \- Adds (if present), window manager (\fBwm\fR) version number. -\- Adds (if present), display manager (\fBdm\fR) version number. - \- Adds (if available, and in display), virtual terminal (\fBvt\fR) number. These are the same as \fBctrl+alt+F[x]\fR numbers usually. Some systems have this, some don't, it varies. +\- Adds (if present) \fBtools:\fR item for all detected running screensavers or +screen lockers. Note that not all screen lockers run as daemons/services, some +are just programs called by other tools or actions. + +\- Adds (if present), display manager (\fBdm\fR) version number. + .TP .B \-xxx \-w \fR, \fB\-W\fR \- Adds location (city state country), observation altitude (if available), @@ -2325,24 +2335,31 @@ Graphics: .TP .B \-a \-I\fR +\- Adds to \fBPower:\fR other hibernate and suspend available (\fBavail:\fR) +states, hibernate suspend \fBimage:\fR size, and if any suspend failures +(\fBfails:\fR), how many. + \- Adds to Packages number of lib packages detected per package manager. Also adds detected package managers with 0 packages listed. Adds package manager tools (supported: rpm, dpkg, pkgtool) Moves to \fBRepos\fR if \fB\-ra\fR. -.nf -\fBinxi \-aI -Info: - .... - Init: systemd v: 245 target: graphical.target (5) default: graphical.target - Compilers: gcc: 9.3.0 alt: 5/6/7/8/9 Packages: pm: apt pkgs: 3681 libs: 2096 - tools: apt, apt\-get,aptitude pm: rpm pkgs: 0 Shell: ksh v: A_2020.0.0 - default: Bash v: 5.0.16 running\-in: kate inxi: 3.1.04\fR -.fi - \- Adds service control tool, tested for in the following order: \fBsystemctl rc\-service rcctl service sv /etc/rc.d /etc/init.d\fR. Can be useful to know which you need when using an unfamiliar machine. +.nf +\fBinxi \-aI +Info: + Memory: total: N/A available: 31.27 GiB used: 13.72 GiB (43.9%) + Processes: 750 Power: uptime: 7d 8m states: freeze,mem,disk suspend: deep + avail: s2idle wakeups: 15 hibernate: platform + avail: shutdown,reboot,suspend,test_resume image: 12.49 GiB Init: systemd + v: 254 target: graphical (5) default: graphical tool: systemctl + Packages: pm: dpkg pkgs: 3926 libs: 2153 tools: apt,apt\-get,aptitude + pm: rpm pkgs: 0 Compilers: gcc: 13.2.0 alt: 10/11/12/13/5/6/8/9 Shell: Bash + v: 5.2.15 running\-in: xfce4\-terminal inxi: 3.3.32\fR +.fi + .TP .B \-a \-j\fR (\fB\-\-swap\fR), \fB\-a \-P\fR [swap], \fB\-a \-P\fR [swap] \- Adds swappiness and vfs cache pressure, and a message to indicate if the @@ -2462,6 +2479,9 @@ Component report to 1 component per line. \- Adds kernel boot parameters to \fBKernel\fR section (if detected). Support varies by OS type. +\- Adds other available (\fBavail:\fR) screensavers/lockers in \fBtools:\fR +section. These are ones installed, but not necessarily active or running. + .TP .B \-a \-\-slots\fR \- Adds PCI children of the main slot bus ID, and their types and class IDs,