nfsiostat: make it work w/python3 Simple fixes here to work with python 2 & 3: - use print() everywhere - dict.iteritems() -> dict.items() - file() -> open() - sys.maxint -> sys.maxsize Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Steve Dickson <steved@redhat.com>
nfsiostat: Breaks on 3.1 kernels nfsiostat depend on all devices entries in /proc/self/mountstats to start with the word 'device'. With 3.1 kernels, NFS entries start with the actual device (i.e. server:/export) not the word 'device'. This change confused nfsiostat parsing. Signed-off-by: Steve Dickson <steved@redhat.com>
pdate addres for Free Software Foundation License texts contain multiple address for FSF, some wrong. So update them and replace COPYING file with http://www.gnu.org/licenses/gpl-2.0.txt which has a few changes to preamble and commentary. Also remove extra COPYING file from utils/statd/ Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
nfsiostat: Breaks on 3.1 kernels nfsiostat depend on all devices entries in /proc/self/mountstats to start with the word 'device'. With 3.1 kernels, NFS entries start with the actual device (i.e. server:/export) not the word 'device'. This change confused nfsiostat parsing. Signed-off-by: Steve Dickson <steved@redhat.com>
pdate addres for Free Software Foundation License texts contain multiple address for FSF, some wrong. So update them and replace COPYING file with http://www.gnu.org/licenses/gpl-2.0.txt which has a few changes to preamble and commentary. Also remove extra COPYING file from utils/statd/ Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
nfs-iostat.py: don't wait for an extra interval when given a count If I invoke the tool with an interval of 10 and a count of 2, it will: - show the summary - sleep 10s - show the stats for the last 10s - sleep 10s - exit Signed-off-by: David Lecorfe <dlecorfec@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
nfs-iostat.py: divide by zero with fresh mount When an export is freshly mounted, /proc/self/mountstats displays age = 0. This causes nfs-iostat.py to divide by zero throwing an error. When we have age = 0, other stats are greater than 0, so we'll set age = 1 and print the relevant stats. Signed-off-by: Kevin Constantine <kevin.constantine@disneyanimation.com> Signed-off-by: Steve Dickson <steved@redhat.com>
nfs-utils: nfs-iostat.py autofs cleanup and option to sort by ops/s Adds --sort option to display mount point stats sorted by ops/s Adds --list=<n> option to only display stats for first <n> mount points E.g. the use of "--sort --list=1" should be useful in seeing stats for only the mountpoint with the highest ops/s. Signed-off-by: Lans Carstensen <Lans.Carstensen@dreamworks.com> Signed-off-by: Steve Dickson <steved@redhat.com>
nfs-utils: nfs-iostat.py autofs cleanup and option to sort by ops/s Introduce optparse for managing command usage/help and the statistics options. This change helps more cleanly add new options such as --sort while preserving the iostat-like interval, count, and mount point positional arguments. Signed-off-by: Lans Carstensen <Lans.Carstensen@dreamworks.com> Signed-off-by: Steve Dickson <steved@redhat.com>
nfs-utils: nfs-iostat.py autofs cleanup and option to sort by ops/s Update list of mount points at each interval and check for differences when producing comparative stats. This ensures proper stats collection for autofs mountpoints. Signed-off-by: Lans Carstensen <Lans.Carstensen@dreamworks.com> Signed-off-by: Steve Dickson <steved@redhat.com>
nfs-utils: nfs-iostat.py autofs cleanup and option to sort by ops/s Conforms Python path to the LSB 3.2+ standard of /usr/bin/python http://refspecs.freestandards.org/LSB_3.2.0/LSB-Languages/LSB-Languages/pylocation.html Per SteveD this is also required for proper rpm dep resolution during builds Signed-off-by: Lans Carstensen <Lans.Carstensen@dreamworks.com> Signed-off-by: Steve Dickson <steved@redhat.com>