systat -swap to display large swap space users

From: Yoshihiro Ota <ota_at_j.email.ne.jp>
Date: Fri, 2 Apr 2021 20:12:14 -0400
Hi,

We do not seem to have a nice way to see current swap space usage per process.
I updated systat to use libprocstat to obtain such infomation and display
along with swap devise/file stats.

I think patch works for 14-CURRENT and 13-STABLE/13.0-*.
12-STABLE needs some changes from main.

The new screen looks like below with 'systat -swap':


                    /0   /1   /2   /3   /4   /5   /6   /7   /8   /9   /10
     Load Average   | 

Device/Path       Size  Used |0%  /10  /20  /30  /40  / 60\  70\  80\  90\ 100|
ada0s1b          2048M 2034M XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
zvol/sys/tempora 1024M 1015M XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
zvol/sys/swap    1024M 1014M XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Total            4096M 4063M XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Pid    Username   Command     Swap/Total Per-Process    Per-System
 24153 hiro       seamonkey   98M /   1G  7%              2%
 23677 hiro       xfce4-pane  28M /  81M 34% XXX          0%
 23629 hiro       xfce4-sess  25M / 118M 21% XX           0%
 23681 hiro       xfdesktop   20M /  58M 34% XXX          0%
 23678 hiro       thunar      15M /  43M 36% XXX          0%
 23658 hiro       at-spi-bus  14M /  23M 63% XXXXXX       0%
 23660 hiro       gvfsd       12M /  21M 56% XXXXX        0%

Disks  ada0  ada1  ada2   cd0 pass0 pass1 pass2 pass3
KB/t   8.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00
tps       0     0     0     0     1     0     0     0
MB/s   0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00
%busy     0     0     0     0     0     0     0     0

Hiro

Received on Fri Apr 02 2021 - 22:13:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:27 UTC