diff options
author | David Lecorfe <dlecorfec@gmail.com> | 2010-09-27 13:29:31 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-09-27 13:29:31 -0400 |
commit | 837796686ad8f9178c7b6855ada728a53ae511e3 (patch) | |
tree | 659473acc00e721dd0a04031508ebbc4eb4c8cc3 /tools | |
parent | eaa588a137b0b2f38aa9e9c542635a222e51ee48 (diff) | |
download | nfs-utils-837796686ad8f9178c7b6855ada728a53ae511e3.tar.gz nfs-utils-837796686ad8f9178c7b6855ada728a53ae511e3.tar.xz nfs-utils-837796686ad8f9178c7b6855ada728a53ae511e3.zip |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/nfs-iostat/nfs-iostat.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/nfs-iostat/nfs-iostat.py b/tools/nfs-iostat/nfs-iostat.py index 1207674..1242379 100644 --- a/tools/nfs-iostat/nfs-iostat.py +++ b/tools/nfs-iostat/nfs-iostat.py @@ -601,7 +601,8 @@ client are listed. while count != 0: print_iostat_summary(old_mountstats, mountstats, devices, sample_time, options) old_mountstats = mountstats - time.sleep(interval) + if count != 1: + time.sleep(interval) sample_time = interval mountstats = parse_stats_file('/proc/self/mountstats') # automount mountpoints add and drop, if automount is involved |