Dan Price wrote:
I have been using Eric Kustarz's "nfstop" dtrace script to keep an eye on
a server; the output looks like this:

host: 129.146.226.97  num nfs calls: 6
host: 129.145.154.106  num nfs calls: 7
host: 129.146.11.146  num nfs calls: 8
host: 129.146.108.85  num nfs calls: 8
host: 10.4.180.27  num nfs calls: 11
host: 129.146.228.172  num nfs calls: 16
host: 129.146.11.145  num nfs calls: 17
host: 129.146.228.151  num nfs calls: 19
host: 129.146.228.144  num nfs calls: 22
...


While this is helpful, I'd much rather format the output as follows:

HOST                    OPS
129.146.226.97            6
129.145.154.106           7
129.146.11.146            8
129.146.108.85            8
10.4.180.27              11
129.146.228.172          16
129.146.11.145           17
129.146.228.151          19
129.146.228.144          22

Which to my eyes is a lot easier to process rapidly.
[snip]

May I suggest simply parsing the output by a shell command, eg usin the initial output shown above, extracting fields 2 and 6 from each line:

nfstop | awk '{printf ("%-20s %3s\n", $2, $6)}'





--
<http://www.sun.com/solaris>      * Johan Hartzenberg *

*Sun Microsystems, Inc.*
Cape Town South Africa
Phone +27 219107160
Mobile +27 730612464
Fax +27 219199214
Email [EMAIL PROTECTED]
<http://www.sun.com/solaris>

_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to