Gathering Statistics About Network Traffic on Links in Oracle Solaris 11

The dlstat and flowstat commands are tools for monitoring and obtaining statistics on network traffic on datalinks and flows, respectively. These commands parallel the dladm and flowadm commands. The following table shows the parallelism between the pair of *adm commands and the pair of *stat commands and their respective functions:

CommandFunction
dladm command optionsUser interface and tool for configuring and administering datalinks.
flowadm command optionsUser interface and tool for configuring and administering flows.
Administrative Commands

CommandFunction
dlstat command optionsUser interface and tool for obtaining statistics on traffic on datalinks.
flowstat command optionsUser interface and tool for obtaining statistics on traffic on flows.
Monitoring Commands

The following variants of the dlstat command can be used to gather network traffic information:

  • dlstat – Displays general information about packets that are being received or transmitted by a system.
  • dlstat show-phys – Displays information about the use of receive and transmit rings. This command corresponds to the dladm show-phys command, which displays non-traffic information about a network physical device.
  • dlstat show-link – Displays detailed information about traffic flow on a given lane. The lane is identified by its datalink. This command corresponds to the dladm show-link and dladm show-vnic commands, which display non-traffic information about datalinks.
  • dlstat show-aggr – Displays information about the use of ports in a link aggregation. This command corresponds to the dladm show-aggr command, which displays non-traffic information about a link aggregation.

How to Obtain Basic Statistics About Network Traffic

  1. Become an administrator.
  2. Observe basic traffic flow over all the datalinks.
# dlstat [-r|-t] [-i interval] [link]

[-r|-t]

Displays either receive-side statistics only (-r option) or transmit-side statistics only (-t option). If you do not use these options, then statistics for both the receive-side and the transmit-side are displayed.-i interval

Specifies the time in seconds at which you want the displayed statistics to be refreshed. If you do not use this option, then static output is displayed.link

Indicates that you want to monitor the statistics of the specified datalink only. If you do not use this option, then information about all datalinks is displayed.

Used by itself, the dlstat command displays information about incoming and outgoing packets on all configured datalinks.

The following information is displayed by most of the options that you use with the dlstat command:

  • Links in the system that have been configured with IP interfaces and that can receive or transmit traffic
  • Packet and byte sizes
  • Interrupts and MAC polling statistics
  • Packet chain lengths

Example – Displaying Basic Receive-Side and Transmit-Side Statistics

This example shows information about network traffic that is being received and sent on all configured datalinks on the system.

# dlstat
   LINK    IPKTS   RBYTES    OPKTS   OBYTES
e1000g0  101.88K   32.86M   40.16K    4.37M
  nxge1    4.50M    6.78G    1.38M   90.90M
  vnic1        8      336        0        0

Example – Displaying Receive-Side Statistics at One-Second Intervals

This example shows information about traffic that is being received on all datalinks. The information is refreshed every second. To stop the display from refreshing, press Control-C.

# dlstat -r -i 1
   LINK   IPKTS  RBYTES   INTRS   POLLS   CH<10 CH10-50   CH>50
e1000g0 101.91K  32.86M  87.56K  14.35K   3.70K     205       5
  nxge1   9.61M  14.47G   5.79M   3.82M 379.98K  85.66K   1.64K
  vnic1       8     336       0       0       0       0       0
e1000g0       0       0       0       0       0       0       0
  nxge1  82.13K 123.69M  50.00K  32.13K   3.17K     724      24
  vnic1       0       0       0       0       0       0       0
...
^C

In this output, the statistics for interrupt (INTRS) are significant. Low interrupt numbers indicate greater efficiency in performance. If the interrupt numbers are high, then you might need to add more resources to the specific link.

Example – Displaying Transmit-Side Statistics at Five-Second Intervals

This example displays information about traffic that is being sent on all datalinks. The information is refreshed every 5 seconds.

# dlstat -t -i 5
   LINK   OPKTS  OBYTES  BLKCNT UBLKCNT
e1000g0  40.24K   4.37M       0       0
  nxge1   9.76M 644.14M       0       0
  vnic1       0       0       0       0
e1000g0       0       0       0       0
  nxge1  26.82K   1.77M       0       0
  vnic1       0       0       0       0
...
^C

How to Obtain Statistics About Ring Usage

  1. Become an administrator.
  2. Display ring statistics.
# dlstat show-phys [-r|-t] [-i interval] [link]

[-r|-t]

Displays either receive-side statistics only (-r option) or transmit-side statistics only (-t option). If you do not use these options, then statistics for both the receive-side and the transmit-side are displayed.-i interval

Specifies the time in seconds at which you want the displayed statistics to be refreshed. If you do not use this option, then static output is displayed.link

Indicates that you want to monitor the statistics of the specified datalink only. If you do not use this option, then information about all datalinks is displayed.

Used by itself, the dlstat show-phys command displays information about incoming and outgoing packets on all configured datalinks.

Example – Displaying Receive-Ring Statistics for a Datalink

This example shows the usage of the receive rings for the datalink.

# dlstat show-phys -r nxge1
     LINK TYPE INDEX   IPKTS  RBYTES
nxge1   rx     0      21   1.79K
nxge1   rx     1       0       0
nxge1   rx     2   1.39M   2.10G
nxge1   rx     3       0       0
nxge1   rx     4   6.81M  10.26G
nxge1   rx     5   4.63M   6.97G
nxge1   rx     6   3.97M   5.98G
nxge1   rx     7       0       0

The nxge device has eight receive rings, which are identified under the INDEX field. An even distribution of packets per ring is an ideal configuration that indicates that the rings are properly allocated to links according to the links’ load. An uneven distribution might indicate a disproportionate distribution of rings per link. The resolution depends on whether the NIC supports dynamic ring allocation, which allows you to redistribute rings per link.

Example – Displaying Transmit Ring Statistics of a Datalink

This example shows the usage of the transmit rings for the datalink.

# dlstat show-phys -t nxge1
 LINK TYPE INDEX   OPKTS   OBYTES
nxge1   tx     0      44    3.96K
nxge1   tx     1       0        0
nxge1   tx     2   1.48M  121.68M
nxge1   tx     3   2.45M  201.11M
nxge1   tx     4   1.47M  120.82M
nxge1   tx     5       0        0
nxge1   tx     6   1.97M  161.57M
nxge1   tx     7   4.59M  376.21M
nxge1   tx     8   2.43M  199.24M
nxge1   tx     9       0        0
nxge1   tx     10  3.23M  264.69M
nxge1   tx     11  1.88M  153.96M

How to Obtain Statistics About Network Traffic on Lanes

  1. Become an administrator.
  2. Display statistics about network lanes.
# dlstat show-link [-r [F]|-t] [-i interval] [link]

[-r|-t]

Displays either receive-side statistics only (-r option) or transmit-side statistics only (-t option). If you do not use these options, then statistics for both the receive-side and the transmit-side are displayed.-i interval

Specifies the time in seconds at which you want the displayed statistics to be refreshed. If you do not use this option, then static output is displayed.link

Indicates that you want to monitor the statistics of the specified datalink only. If you do not use this option, then information about all datalinks is displayed.

If ring grouping is supported and dedicated rings were configured, then hardware lane statistics are displayed. If no dedicated rings are configured, then software lane statistics are displayed.

Example – Displaying Receive-Side Statistics for a Lane

This example shows the following information:

  • How packets are received on a hardware lane
  • How packets are received on a software lane
  • How packets are received on a software lane and fanned out to assigned CPUs

The following command shows receive-side statistics for the specific link. The information indicates ring usage. However, the data might also reflect the implementation of other resource allocations, such as bandwidth limits and priority processing.

# dlstat show-link -r nxge1
 LINK TYPE    ID INDEX  IPKTS   RBYTES  INTRS   POLLS   CH<10 CH10-50  CH>50
nxge1   rx local    --      0        0      0       0       0       0      0
nxge1   rx    hw     1      0        0      0       0       0       0      0
nxge1   rx    hw     2  1.73M    2.61G  1.33M 400.22K  67.03K   7.49K     38
nxge1   rx    hw     3      0        0      0       0       0       0      0
nxge1   rx    hw     4  8.44M   12.71G  4.35M   4.09M 383.28K  91.24K  2.09K
nxge1   rx    hw     5  5.68M    8.56G  3.72M   1.97M 203.68K  43.94K    854
nxge1   rx    hw     6  4.90M    7.38G  3.11M   1.80M 168.59K  42.34K    620
nxge1   rx    hw     7      0        0      0       0       0       0      0

The following command shows receive-side statistics for the specific link. In the output, the ID field indicates whether hardware rings are exclusively assigned or shared among clients. In the ixgbe card, Rx rings are shared if other clients such as VNICs are configured over the link as well. Thus, for this specific example, Rx rings are shared, as indicated by the sw value under the ID field.

# dlstat show-link -r ixgbe0
  LINK TYPE    ID INDEX   IPKTS  RBYTES    INTRS  POLLS  CH<10 CH10-50  CH>50
ixgbe0   rx local    --       0       0        0      0      0       0      0
ixgbe0   rx    sw    -- 794.28K   1.19G  794.28K      0      0       0      0

The following command shows usage of receive-side statistics for the specific link. In addition, with the use of the -F option in the command, the output also provides fanout information. Specifically, the fanout count is two (0 and 1). Network traffic that is received on the hardware lane that uses ring 0 is split and passed on across the two fanouts. Likewise, network traffic that is received on the hardware lane that uses ring 1 is also split and divided across the two fanouts.

# dlstat show-link -r -F nxge1
 LINK     ID   INDEX   FOUT   IPKTS
nxge1  local      --      0       0
nxge1     hw       0      0  382.47K
nxge1     hw       0      1        0
nxge1     hw       1      0  367.50K
nxge1     hw       1      1  433.24K

Example – Displaying Transmit-Side Statistics for a Lane

The following example shows statistics about outbound packets on a specific lane.

# dlstat show-link -t nxge1
 LINK   TYPE   ID  INDEX    OPKTS    OBYTES   BLKCNT   UBLKCNT
nxge1     tx   hw      0       32     1.44K        0         0
nxge1     tx   hw      1        0         0        0         0
nxge1     tx   hw      2    1.48M    97.95M        0         0
nxge1     tx   hw      3    2.45M   161.87M        0         0
nxge1     tx   hw      4    1.47M    97.25M        0         0
nxge1     tx   hw      5        0       276        0         0
nxge1     tx   hw      6    1.97M   130.25M        0         0
nxge1     tx   hw      7    4.59M   302.80M        0         0
nxge1     tx   hw      8    2.43M   302.80M        0         0
nxge1     tx   hw      9        0         0        0         0
nxge1     tx   hw      10   3.23M   213.05M        0         0
nxge1     tx   hw      11   1.88M   123.93M        0         0

Leave a Comment