Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Skip devices without I/O #164

Closed
wants to merge 1 commit into from
Closed

Skip devices without I/O #164

wants to merge 1 commit into from

Conversation

TobiX
Copy link

@TobiX TobiX commented Feb 15, 2019

ISSUE TYPE
  • Bugfix pull-request
DSTAT VERSION
Dstat 0.8.0
Written by Dag Wieers <dag@wieers.com>
Homepage at http://dag.wieers.com/home-made/dstat/

Platform posix/linux2
Kernel 4.19.0-2-amd64
Python 2.7.15+ (default, Feb  3 2019, 13:13:16) 
[GCC 8.2.0]

Terminal type: rxvt-unicode-256color (color support)
Terminal size: 49 lines, 168 columns

Processors: 4
Pagesize: 4096
Clock ticks per secs: 100

internal:
	aio,cpu,cpu-adv,cpu-use,cpu24,disk,disk24,disk24-old,epoch,fs,int,int24,io,ipc,load,lock,mem,mem-adv,net,page,page24,proc,raw,socket,
	swap,swap-old,sys,tcp,time,udp,unix,vm,vm-adv,zones
/XXX/dstat/plugins:
	battery,battery-remain,condor-queue,cpufreq,dbus,disk-avgqu,disk-avgrq,disk-svctm,disk-tps,disk-util,disk-wait,dstat,dstat-cpu,dstat-ctxt,
	dstat-mem,fan,freespace,fuse,gpfs,gpfs-ops,helloworld,ib,innodb-buffer,innodb-io,innodb-ops,jvm-full,jvm-vm,lustre,md-status,memcache-hits,
	mongodb-conn,mongodb-mem,mongodb-opcount,mongodb-queue,mongodb-stats,mysql-io,mysql-keys,mysql5-cmds,mysql5-conn,mysql5-innodb,mysql5-innodb-basic,
	mysql5-innodb-extra,mysql5-io,mysql5-keys,net-packets,nfs3,nfs3-ops,nfsd3,nfsd3-ops,nfsd4-ops,nfsstat4,ntp,postfix,power,proc-count,qmail,
	redis,rpc,rpcd,sendmail,snmp-cpu,snmp-load,snmp-mem,snmp-net,snmp-net-err,snmp-sys,snooze,squid,test,thermal,top-bio,top-bio-adv,
	top-childwait,top-cpu,top-cpu-adv,top-cputime,top-cputime-avg,top-int,top-io,top-io-adv,top-latency,top-latency-avg,top-mem,top-oom,utmp,vm-cpu,
	vm-mem,vm-mem-adv,vmk-hba,vmk-int,vmk-nic,vz-cpu,vz-io,vz-ubc,wifi,zfs-arc,zfs-l2arc,zfs-zil
/usr/share/dstat:
	battery,battery-remain,condor-queue,cpufreq,dbus,disk-avgqu,disk-avgrq,disk-svctm,disk-tps,disk-util,disk-wait,dstat,dstat-cpu,dstat-ctxt,
	dstat-mem,fan,freespace,fuse,gpfs,gpfs-ops,helloworld,innodb-buffer,innodb-io,innodb-ops,lustre,md-status,memcache-hits,mysql-io,mysql-keys,
	mysql5-cmds,mysql5-conn,mysql5-innodb,mysql5-innodb-basic,mysql5-innodb-extra,mysql5-io,mysql5-keys,net-packets,nfs3,nfs3-ops,nfsd3,nfsd3-ops,
	nfsd4-ops,nfsstat4,ntp,postfix,power,proc-count,qmail,redis,rpc,rpcd,sendmail,snmp-cpu,snmp-load,snmp-mem,snmp-net,snmp-net-err,snmp-sys,
	snooze,squid,test,thermal,top-bio,top-bio-adv,top-childwait,top-cpu,top-cpu-adv,top-cputime,top-cputime-avg,top-int,top-io,top-io-adv,
	top-latency,top-latency-avg,top-mem,top-oom,utmp,vm-cpu,vm-mem,vm-mem-adv,vmk-hba,vmk-int,vmk-nic,vz-cpu,vz-io,vz-ubc,wifi,zfs-arc,zfs-l2arc,
	zfs-zil
SUMMARY

Linux 4.18+ has added more fields to the diskstats proc file, so the
original skip condition for devices without I/O didn't apply anymore.

Before:

$ dstat -af 1 5
Terminal width too small, trimming output.
--total-cpu-usage-- -dsk/loop0---dsk/loop1---dsk/loop2---dsk/loop3---dsk/loop4---dsk/loop5---dsk/loop6---dsk/loop7--dsk/mmcblk0---dsk/sda-----dsk/sdb-- ---paging-->
usr sys idl wai stl| read  writ: read  writ: read  writ: read  writ: read  writ: read  writ: read  writ: read  writ: read  writ: read  writ: read  writ|  in   out >
 20   7  71   2   0|   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :  19B   31k:  41k   29k:  50k   88k| 504B 1100B>
  3   2  95   0   0|   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0   476k|   0     0 >
  2   1  97   0   0|   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 |   0     0 >
  2   2  97   0   0|   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 |   0     0 >
  3   2  95   0   0|   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 :   0     0 |   0     0 >

After:

$ ./dstat -af 1 5
--total-cpu-usage-- dsk/mmcblk0---dsk/sda-----dsk/sdb-- --net/br0----net/wlp2s0 ---paging-- ---system--
usr sys idl wai stl| read  writ: read  writ: read  writ| recv  send: recv  send|  in   out | int   csw 
 20   7  71   2   0|  19B   31k:  41k   29k:  50k   88k|   0     0 :   0     0 | 504B 1100B| 264   984 
  2   2  97   0   0|   0     0 :   0     0 :   0     0 |   0     0 : 204B  140B|   0     0 | 468  1615 
  2   2  96   0   0|   0     0 :   0     0 :   0     0 |   0     0 :   0     0 |   0     0 | 527  1927 
  2   2  96   0   0|   0     0 :   0     0 :   0     0 |   0     0 : 120B    0 |   0     0 | 484  1755 
  1   2  97   0   0|   0     0 :   0     0 :   0     0 |   0     0 :  66B  637B|   0     0 | 389  1522 

Linux 4.18+ has added more fields to the diskstats proc file, so the
original skip condition for devices without I/O didn't apply anymore.
@dagwieers dagwieers added the wontfix_talk_to_redhat Red Hat has decided to replace this utility with a framework label May 22, 2019
@dagwieers dagwieers closed this May 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix_talk_to_redhat Red Hat has decided to replace this utility with a framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants