----- Original Message -----
From: Darren Reed <darren.r...@sun.com>
Date: Thursday, June 25, 2009 6:35 pm
Subject: Re: [crossbow-discuss] inception review summary of PSARC/2009/364 - 
dlstat and flowstat
To: Shrikrishna Khare <Shrikrishna.Khare at Sun.COM>
Cc: James Carlson <carlsonj at workingcode.com>, gdamore at opensolaris.org, 
crossbow-discuss at opensolaris.org


> Shrikrishna Khare wrote:
> >
> >Here is an alternative (from the discussion Nicolas and I had a while 
> ago).
> >
> >1. dlstat -k -p > snap1.txt               # Dump all the statistics 
> in parsable format, output redirected to snap1.txt. This option is 
> part of the originally proposed man page.
> >2. dlstat -r -h                           # Display receive side per 
> hardware lane statistics.
> >3. dlstat -r -h -d snap1.txt              # Diff "current receive 
> side per hardware lane stats" with the stats saved in snap1.txt and display.
> >4. dlstat -k -p > snap2.txt               # Dump all the statistics 
> in parsable format, output redirected to snap2.txt.
> >5. dlstat -t -h -d snap1.txt -D snap2.txt # Diff "transmit side per 
> hardware lane stats" saved in snap2.txt with the stats saved in 
> snap1.txt and display.
> >
> >This approach not only avoids resetting statistics but also provides 
> an easy to use interface for diff calculation.
> 
> Why are you building "diff" capability into dlstat?
> Why aren't the various incarnations of diff suitable for use here?
> Isn't it better to provide output that is friendly to diff(1) use?
> My assertion is that if the output is friendly to diff(1), then you don't
> need to build in diff capability and that the output will also then be
> friendly to many other commands.

- I did not find diff(1) option that can compute arithmetic difference.

- Moreover, even if there is some diff variant that can do it, consider the use 
case as in example above: 
  Diff "current receive side per hardware lane stats" with the stats saved in 
snap1.txt and display.
 
  It is still cumbersome to do an additional 
        dlstat -k -p > snap3.txt 
        <arithmatic diff> snap1.txt snap3.txt
        and then hunt through the machine parsable format to look for specific 
fields of your interest - per hardware lane stats in our example.

  Having a complete snapshot at particular instant (dlstat -k -p <file> and 
then having ability to request diff against statistics of our interest (e.g. 
dlstat -r -h -d <file>) looks appealing to me in comparison.  

  Moreover, you can then do fancier stuff like: 
              dlstat -r -h -d <file> -i 2

  which will report diffs with the file after every 2 seconds. 

  Essentially, the proposed approach is aimed at catering to all 'reset' stats 
requirement, without really resetting anything.
         


> 
> Darren
> 

Reply via email to