Hi, Here is an early webrev with dlstat changes. Please note that I am *not* requesting code review. This is still work in progress with several known(and unknown!) issues.
Webrev: http://cr.opensolaris.org/~shri.k/dlstat_initial_webrev PSARC case: http://arc.opensolaris.org/caselog/PSARC/2009/364/ In this webrev, dlstat queries kernel for the statistics with explicit ioctl. That would be changed to a kstat query instead with kstat counters introduced for all the statistics in question. Moreover, some of the command syntax will change. Refer "issues" in the PSARC case noted below for more details. Some of the sample outputs generated on Intel 10GbE setup with above changes: # Display statistics # dlstat show ixgbe0 LINK IPKTS RBYTES OPKTS OBYTES UTIL ixgbe0 39.52G 4.19T 702.00K 121.05M 0 # Receive side statistics # dlstat show ixgbe0 -r LINK IPKTS RBYTES INTRS POLLS HDRPS SDRPS CH<10 CH10-50 CH>50 UTIL ixgbe0 39.52G 4.19T 5.22G 34.30G 17.29G 0.00 1.41G 178.41M 155.05M 0 # Transmit side statistics # dlstat show ixgbe0 -t LINK OPKTS OBYTES SDRPS UTIL ixgbe0 702.00K 121.05M 0.00 0 # Receive side per lane statistics for ixgbe0 (Only 6 Rx rings are active on the system) # dlstat show ixgbe0 -r -h LINK IPKTS RBYTES INTRS POLLS HDRPS SDRPS CH<10 CH10-50 CH>50 UTIL ixgbe0:0 6.82G 722.60G 862.72M 5.96G 17.29G 0.00 207.69M 32.17M 26.66M 0 ixgbe0:1 5.24G 554.98G 774.95M 4.46G 0.00 0.00 221.86M 26.62M 20.66M 0 ixgbe0:2 7.42G 786.73G 880.91M 6.54G 0.00 0.00 239.35M 30.39M 28.88M 0 ixgbe0:3 5.67G 601.03G 770.46M 4.90G 0.00 0.00 192.87M 27.24M 23.47M 0 ixgbe0:4 7.47G 792.31G 1.07G 6.41G 0.00 0.00 324.13M 32.64M 27.85M 0 ixgbe0:5 6.90G 731.19G 866.66M 6.03G 0.00 0.00 224.19M 29.35M 27.52M 0 ~ Shri