[crossbow-discuss] Tools to view NIC utilization?

Michael Lim Michael.Lim at Sun.COM
Tue Oct 17 14:47:41 PDT 2006


Kais Belgaied wrote:
> Hello,
> 
> the existing dladm show-vnic -s displays the number of bytes 
> IN/OUT/dropped.
> We'll be delivering more tools for monitoring (V)NICs utilization:
> basically tools to answer the following two questions:
>     . How is the bandwidth available on a given link is getting utilized 
> between
>      the flows (VNICs and others) that share it.
>    . How much CPU resources these flows are consuming .
> 
> Mike Lim will be sending the proposed tool on this list soon.

Here's my current proposal.  Comments welcome...

netstat -u (proposed)

CrossBow would add -u -uv and-U options to display network usage 
information by flow. For the first form netstat -u, the input/output 
bytes and errors since startup will be displayed. The second form 
netstat -uv is more verbose and adds the device, flow description and 
resource information. The third form netstat -U will provide network 
flow statistics in a manner similar to BSD top or prstat(1M).

Usage

#netstat -u
Name          ibytes    ipkts    ierrs       obytes   opkts    oerrs
vnic1         123456789 12345678 123  10.1%  12346789 12345678 123 10.2%
vnic2         123456789 12345678 123  10.1%  12346789 12345678 123 10.2%
tcp_888       123456789 12345678 123  10.1%  12346789 12345678 123 10.2%
tcp_25        123456789 12345678 123  10.1%  12346789 12345678 123 20.2%

Usage-verbose

#netstat -uv
Name         Dev       desc                 resource
              ibytes    ipkts    ierrs       obytes    opkts    oerrs
vnic1        bge0      IP=1.2.3.4           bw=2000kbps
              123456789 12345678 123  10.1%  123456789 12345678 123 20.2%
vnic2        bge0      MAC=0:22:33:44:55    bw=2000kbps
              123456789 12345678 123  10.1%  123456789 12345678 123 20.2%
tcp_888      vnic1     DPORT=888            bw=2000kbps
              123456789 12345678 123  10.1%  123456789 12345678 123 20.2%
tcp_25       vnic1     DPORT=25             bw=1000kbps
              123456789 12345678 123  10.1%  123456789 12345678 123 20.2%


Usage-top

#netstat -U
              CPU          Input                 Output
Name         ID   Use     bps    pkt/s          bps     pkt/s
tcp_888      0   0.2%   12.23M  12345  20.1%   12.23M  12345  30.2%
vnic1        1   1.0%   12.22M  12345  10.1%   12.24M  12345  10.2%
tcp_25       1   0.3%  123.12K  12345   8.1%   12.25M  12345  10.2%
vnic2        2   1.1%    1.23M  12345   4.1%   12.21K  12345  33.2%
unused                                 79.8%                  39.6%

-Mike



More information about the crossbow-discuss mailing list