Page MenuHomeFreeBSD

systat: Introduced sysputpage() to display large page size with human readable format.
ClosedPublic

Authored by ota_j.email.ne.jp on May 14 2020, 2:25 AM.

Details

Summary

Using UI units allows to fit larger numbers in columns.
Stop calling v_page_size - this is a value that doesn't change at runtime.
Renamed WINDOW *wnd to *wd to avoid conflict with global *wnd variable.
Use bit-shift to convert page size to byte.

Test Plan

systat -vm 10 to compare screen.
My output is attached below for comparison.

New screen:

 5 users    Load  0.23  0.27  0.17                  May 13 18:15
Mem usage:   7%Phy  4%Kmem                           VN PAGER   SWAP PAGER

Mem: REAL VIRTUAL in out in out

Tot   Share      Tot    Share    Free  count

Act 56664K 0 335228K 0 2288M pages
All 57400K 675840 336988K 1572864 ioflt Interrupts
Proc: cow 58 total

r   p   d   s   w   Csw  Trp  Sys  Int  Sof  Flt        zfod      3 atkbd0 1
           58       164    1   50   23   16             ozfod    18 acpi0 9
                                                       %ozfod       psm0 12

0.2%Sys 0.0%Intr 0.0%User 0.0%Nice 99.8%Idle daefr 2 ata0 14

prcfr ehci0 19
                 totfr       em1:irq0
9 dtbuf          react       em0:irq0

Namei Name-cache Dir-cache 119343 maxvn pdwak 24 cpu0:timer

Calls    hits   %    hits   %      1621 numvn       10 pdpgs    11 cpu1:timer
   15      15 100                   248 frevn          intrn       ahci0:ch0
                                                  142M wire        ahci0:ch1

Disks ada0 ada1 ada2 ada3 cd0 pass0 pass1 31916K act ahci0:ch2
KB/t 0.00 0.00 0.00 0.00 0.00 0.00 0.00 3244K inact ahci0:ch3
tps 0 0 0 0 0 1 0 0 laund
MB/s 0.00 0.00 0.00 0.00 0.00 0.00 0.00 2288M free

Old screen:

 6 users    Load  0.31  0.30  0.21                  May 13 18:20
Mem usage:  10%Phy  5%Kmem

Mem: KB REAL VIRTUAL VN PAGER SWAP PAGER

Tot   Share      Tot    Share    Free           in   out     in   out

Act 59008 340200 2273772 count
All 59744 660 341960 1536 pages
Proc: Interrupts

r   p   d   s   w   Csw  Trp  Sys  Int  Sof  Flt        ioflt    64 total
           59       195   36  138   28   20   35      6 cow       5 atkbd0 1
                                                     19 zfod     19 acpi0 9

0.5%Sys 0.1%Intr 0.1%User 0.0%Nice 99.3%Idle 2 ozfod psm0 12

8%ozfod 2 ata0 14
                 daefr       ehci0 19
7 dtbuf       18 prcfr       em1:irq0

Namei Name-cache Dir-cache 119343 maxvn 33 totfr em0:irq0

Calls    hits   %    hits   %      2227 numvn          react    23 cpu0:timer
  233     214  92       2   1       538 frevn          pdwak    13 cpu1:timer
                                                    10 pdpgs     2 ahci0:ch0

Disks ada0 ada1 ada2 ada3 cd0 pass0 pass1 intrn ahci0:ch1
KB/t 10.22 0.00 0.00 0.00 0.00 0.00 0.00 173992 wire ahci0:ch2
tps 2 0 0 0 0 1 0 34048 act ahci0:ch3
MB/s 0.02 0.00 0.00 0.00 0.00 0.00 0.00 41712 inact
%busy 0 0 0 0 0 0 0 laund

2273772 free

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ota_j.email.ne.jp retitled this revision from Introduced sysputpage() to display large page size with human readable format. to systat: Introduced sysputpage() to display large page size with human readable format..May 14 2020, 2:26 AM
This revision was not accepted when it landed; it landed in state Needs Review.May 15 2020, 5:37 PM
This revision was automatically updated to reflect the committed changes.