* [nfs-utils PATCH] mountstats: Normalize the mountpoints passed on the command line.
@ 2015-03-03 19:15 Scott Mayhew
2015-03-04 13:12 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Scott Mayhew @ 2015-03-03 19:15 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
Normalize the mountpoints passed on the command line so that commands
like 'mountstats /mnt/' succeed rather than fail.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
tools/mountstats/mountstats.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py
index 7f5dee1..38943eb 100644
--- a/tools/mountstats/mountstats.py
+++ b/tools/mountstats/mountstats.py
@@ -686,7 +686,7 @@ def mountstats_command(args):
"""Mountstats command
"""
mountstats = parse_stats_file(args.infile)
- mountpoints = args.mountpoints
+ mountpoints = [os.path.normpath(mp) for mp in args.mountpoints]
# make certain devices contains only NFS mount points
if len(mountpoints) > 0:
@@ -735,7 +735,7 @@ def nfsstat_command(args):
"""nfsstat-like command for NFS mount points
"""
mountstats = parse_stats_file(args.infile)
- mountpoints = args.mountpoints
+ mountpoints = [os.path.normpath(mp) for mp in args.mountpoints]
v3stats = DeviceData()
v3stats.setup_accumulator(Nfsv3ops)
v4stats = DeviceData()
@@ -822,7 +822,7 @@ def iostat_command(args):
"""iostat-like command for NFS mount points
"""
mountstats = parse_stats_file(args.infile)
- devices = args.mountpoints
+ devices = [os.path.normpath(mp) for mp in args.mountpoints]
if args.since:
old_mountstats = parse_stats_file(args.since)
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [nfs-utils PATCH] mountstats: Normalize the mountpoints passed on the command line.
2015-03-03 19:15 [nfs-utils PATCH] mountstats: Normalize the mountpoints passed on the command line Scott Mayhew
@ 2015-03-04 13:12 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2015-03-04 13:12 UTC (permalink / raw)
To: Scott Mayhew; +Cc: linux-nfs
On 03/03/2015 02:15 PM, Scott Mayhew wrote:
> Normalize the mountpoints passed on the command line so that commands
> like 'mountstats /mnt/' succeed rather than fail.
>
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Committed...
steved.
> ---
> tools/mountstats/mountstats.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/mountstats/mountstats.py b/tools/mountstats/mountstats.py
> index 7f5dee1..38943eb 100644
> --- a/tools/mountstats/mountstats.py
> +++ b/tools/mountstats/mountstats.py
> @@ -686,7 +686,7 @@ def mountstats_command(args):
> """Mountstats command
> """
> mountstats = parse_stats_file(args.infile)
> - mountpoints = args.mountpoints
> + mountpoints = [os.path.normpath(mp) for mp in args.mountpoints]
>
> # make certain devices contains only NFS mount points
> if len(mountpoints) > 0:
> @@ -735,7 +735,7 @@ def nfsstat_command(args):
> """nfsstat-like command for NFS mount points
> """
> mountstats = parse_stats_file(args.infile)
> - mountpoints = args.mountpoints
> + mountpoints = [os.path.normpath(mp) for mp in args.mountpoints]
> v3stats = DeviceData()
> v3stats.setup_accumulator(Nfsv3ops)
> v4stats = DeviceData()
> @@ -822,7 +822,7 @@ def iostat_command(args):
> """iostat-like command for NFS mount points
> """
> mountstats = parse_stats_file(args.infile)
> - devices = args.mountpoints
> + devices = [os.path.normpath(mp) for mp in args.mountpoints]
>
> if args.since:
> old_mountstats = parse_stats_file(args.since)
> -- 1.9.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-04 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-03 19:15 [nfs-utils PATCH] mountstats: Normalize the mountpoints passed on the command line Scott Mayhew
2015-03-04 13:12 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).