scottchiefbaker / dool

Python3 compatible fork of dstat
GNU General Public License v3.0
332 stars 64 forks source link

Incorrect help for --vmstat (confusion between -s/--swap and -y/--sys) #54

Closed F-S-T closed 12 months ago

F-S-T commented 1 year ago

Hi,

SUMMARY

I think there is an error in help of --vmstat: "-v, --vmstat equals -pmgdsc -D total" It should say "-pmgdyc -D total s"

ISSUE TYPE
DOOL VERSION

Dool 1.3.0

OS / ENVIRONMENT

Red Hat 8 but not relevant.

STEPS TO REPRODUCE
dool -v 1 1
┄┄┄procs┄┄┄┬┄┄┄┄┄┄memory┄usage┄┄┄┄┄┬┄┄┄paging┄┄┬┄dsk/total┄┬┄┄┄system┄┄┬┄┄total┄cpu┄usage┄┄
run blk new│ used  free  cach  avai│  in   out │ read  writ│ int   csw │usr sys idl wai stl
  0   0 0.6│ 193M 1425M  321M 1613M│   0     0 │ 884k  358k│ 133   207 │  3   1  96   0   0
dool -pmgdsc -D total 1 1
┄┄┄procs┄┄┄┬┄┄┄┄┄┄memory┄usage┄┄┄┄┄┬┄┄┄paging┄┄┬┄dsk/total┄┬┄┄┄┄swap┄┄┄┬┄┄total┄cpu┄usage┄┄
run blk new│ used  free  cach  avai│  in   out │ read  writ│ used  free│usr sys idl wai stl
  0   0 0.6│ 193M 1425M  321M 1613M│   0     0 │ 883k  357k│   0  2048M│  3   1  96   0   0
dool -pmgdyc -D total 1 1
┄┄┄procs┄┄┄┬┄┄┄┄┄┄memory┄usage┄┄┄┄┄┬┄┄┄paging┄┄┬┄dsk/total┄┬┄┄┄system┄┄┬┄┄total┄cpu┄usage┄┄
run blk new│ used  free  cach  avai│  in   out │ read  writ│ int   csw │usr sys idl wai stl
  0   0 0.6│ 193M 1425M  321M 1613M│   0     0 │ 881k  356k│ 134   207 │  3   1  96   0   0
EXPECTED RESULTS

According to help, dool -v 1 1 should have same output than dool -pmgdsc -D total 1 1 (with swap columns)

ACTUAL RESULTS

dool -v 1 1 have same output than dool -pmgdyc -D total 1 1 (with sys columns).

Those results are conformed with source code (https://github.com/scottchiefbaker/dool/blob/master/dool#L176) which includes sys and not swap for vmstat:

            elif opt in ['-v', '--vmstat']:
                self.plugins += [ 'proc', 'mem', 'page', 'disk', 'sys', 'cpu' ]