Public bug reported:

The output from nfsstat is visually confusing.   For instance, output from 
nfsstat -c:
Client nfs v3:
null         getattr      setattr      lookup       access       readlink     
0         0% 541      69% 8         1% 66        8% 36        4% 0         0% 

It's all too easy to read "getattr" at 0% and setattr at 69%.    (That's wrong, 
of course,
but it had me confused for 10 minutes until I looked at the source code.)
It's easy to see why it's confusing:
1) The corresponding counts and percentages are far apart (10 spaces or so)
2) The close visual pairings are a percentage and the _next_ count (1 space)
3) The labels are close to the wrong percentage and far from the right 
percentage.

A sensible user interface design would right-justify the counts, instead of 
left-justifying them.
That would lead to a count being close to the corresponding percentage.    
Then, one would
right-justify the labels to put them close to both numbers.

That involves simply deleting the minus signs in printf specifications in 
print_callstats in nfsstat.c
                        printf("%-13s", names[i+j]);
...
                        printf("%-8u%3llu%% ", info[i+j], pct);

Are there any bad side effects?   Hard to say.  It depends on how many people 
use the output
of nfsstats in scripts and how flexible their parsing is.     Since the man 
page doesn't specify
a  format, and people shouldn't depend on it too much.    Also, all the 
information is available
in /proc/net/rpc/nfs so a sensible script *shouldn't* use nfsstat for 
information.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: nfs-common 1:1.2.2-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-22.34-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Thu Oct 14 09:33:16 2010
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: nfs-utils

** Affects: nfs-utils (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug maverick

-- 
nfsstat output bad visual design
https://bugs.launchpad.net/bugs/660386
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to