Go to main content

Managing Network Virtualization and Network Resources in Oracle® Solaris 11.3

Exit Print View

Updated: April 2018
 
 

Displaying Network Traffic Statistics of Links

You can use the following variants of the dlstat command to display network traffic information.

Command
Information Provided
dlstat [link]
dlstat –rt [link]
dlstat show-link [link]
Displays inbound and outbound traffic statistics per datalink
dlstat show-link –rt [link]
Displays inbound and outbound traffic statistics per ring per datalink
dlstat show-phys [link]
Displays inbound and outbound traffic statistics per network physical device
dlstat show-phys –rt [link]
Displays inbound and outbound traffic statistics per ring per network physical device
dlstat show-aggr [link]
dlstat show-aggr –rt [link]
Displays inbound and outbound traffic statistics per port per aggregation
dlstat show-bridge [bridge]
dlstat show-bridge –rt [bridge]
Displays inbound and outbound traffic statistics per bridge
dlstat show-cap [link]
Displays statistics for packets that are logged by a firewall

You can use the –r option to display receive-side statistics information or the –t option to display the transmit-side statistics information with the dlstat command. For more information about other options, see the dlstat(1M) man page.

Displaying Network Traffic Statistics of Network Devices

The dlstat show-phys command provides statistics that refer to the physical network device. As shown in Ring Allocation in Datalinks, the dlstat show-phys command operates on the hardware rings which are on the device layer of the network stack.

You can use the following command syntax to display the network traffic statistics on network devices:

# dlstat show-phys [–r|–t] [–Tu | –Td] [–o idrops[,idropbytes][,odrops][,odropbytes]] \
 [link] [interval [count]]
–r

Displays receive-side network traffic statistics only. You should not specify the –t option with this option.

If you do not specify the –r option or the –t option, both the transmit-side and receive-side network statistics are displayed.

–t

Displays transmit-side network traffic statistics only. You should not specify the –r option with this option.

If you do not specify the –r or the –t option, both the transmit-side and receive-side network statistics are displayed.

–Tu

Displays the current time in internal representation.

–Td

Displays the current time in standard date format.

–o idrops[,idropbytes][,odrops][,odropbytes]]

Displays the input and output packet drops per physical datalink. In addition to the number of input and output packet drops, this option displays the number of bytes of the drops.

link

Name of the datalink whose network statistics you want to monitor. If you do not specify the datalink, then the information about all the configured datalinks on the system are displayed.

interval

Specifies the time in seconds at which you want to refresh the network statistics.

count

Specifies the number of times you want the displayed network traffic statistics to be refreshed. If you do not specify the count value, the statistics are refreshed indefinitely.

Example 83  Displaying Traffic Statistics for Physical Links on the System

In this example, both incoming and outgoing network traffic on each link on the system is displayed. The number of packets and their byte sizes are displayed.

# dlstat show-phys
LINK    IPKTS   RBYTES     OPKTS    OBYTES
net5        0        0        0        0
net6        0        0        0        0
net0   25.57K    5.10M    1.93K  226.05K
net0      179   26.63K      161   22.75K
net3        0        0        0        0
net4        0        0        0        0
net2        0        0        0        0
net8      238  137.16K      191    8.41K
net1        0        0        0        0
...

The output shows the following information:

LINK

Physical or virtual datalink, identified by a name

IPKTS

Number of inbound packets on the link

RBYTES

Number of bytes received on the link

OPKTS

Number of outbound packets on the link

OBYTES

Number of bytes sent on this link

Example 84  Displaying Receive-Side Traffic Statistics for Network Devices

In this example, network traffic statistics that are being received are displayed with an interval value of 2 seconds and the count value of 3.

# dlstat show-phys -r 2 3
LINK  TYPE  INDEX    IPKTS   RBYTES
net0    rx      0    8.03M   12.09G
net1    rx      0        0        0
net0    rx      0    8.79K   13.28M
net1    rx      0        0        0
net0    rx      0    8.50K   12.83M
net1    rx      0        0        0

Consider the datalinks, net0 and net1 as a set. The first set of datalinks, net0 and net1, show the total number of packets and bytes received. In this example, 8.03M is the total number of packets received and 12.09G is the total number of bytes received by net0. The second set of datalinks, net0 and net1, show the network traffic statistics in rates per second, also known as the normalized value. That is, 8.79K is the normalized value of the packets received by net0 in the interval of 2 seconds. Similarly, the third set of datalinks, net0 and net1, also show the normalized value for the network traffic statistics in the interval of 2 seconds.

Example 85  Displaying Receive-Side Traffic Statistics for a Network Device

In this example, the incoming traffic statistics for the datalink net0 are displayed.

# dlstat show-phys -r net0
LINK     TYPE     ID    INDEX    IPKTS     RBYTES
net0      rx   local      --        0          0
net0      rx      hw       1        0          0
net0      rx      hw       2    1.73M      2.61G
net0      rx      hw       3        0          0
net0      rx      hw       4    8.44M     12.71G
net0      rx      hw       5    5.68M      8.56G
net0      rx      hw       6    4.99M      7.38G
net0      rx      hw       7        0          0

In this example, the net0 datalink 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 link's load. An uneven distribution indicates a disproportionate distribution of rings per link. The resolution of the uneven distribution depends on whether the NIC supports dynamic ring allocation. If it does, you can redistribute rings per link to process packets more evenly. For more information, see Managing NIC Rings.

Example 86  Displaying Transmit-Side Traffic Statistics for a Network Device

In this example, the usage of the transmit rings for net0 as a network device is displayed.

# dlstat show-phys -t net0
LINK  TYPE  INDEX    OPKTS   OBYTES
net0    tx      0       93    4.63K
net0    tx      1        0        0
net0    tx      2        0        0
net0    tx      3        0        0
net0    tx      4        0        0
net0    tx      5       47   11.02K
net0    tx      6       23    7.13K
net0    tx      7        0        0
Example 87  Displaying Traffic Statistics for a Network Device With Time

The following example displays statistics about network traffic for net0 as a network device with internal representation of the current time.

# dlstat show-phys -Tu net0
1401652481
           LINK    IPKTS   RBYTES    OPKTS   OBYTES
           net0      184   27.14K      165   22.91K

The following example displays statistics about network traffic for net0 as a network device with the current time in standard date format.

# dlstat show-phys -Td net0
Sun Jun  1 12:54:47 PDT 2014
           LINK    IPKTS   RBYTES    OPKTS   OBYTES
           net0      184   27.14K      165   22.91K
Example 88  Displaying Input and Output Packet Drops

The following example displays the input and output packet drop statistics for the datalink net0.

# dlstat show-phys net0 -o idrops,idropbytes,odrops,odropbytes
  IDROPS IDROPBYTES   ODROPS ODROPBYTES
   399     42.52K        0       0

Displaying Network Traffic Statistics of Datalinks

You can use the dlstat show-link command to display the network traffic statistics for a datalink.

Example 89  Displaying Network Traffic Statistics for a Datalink

This example shows the network traffic statistics for the datalink vnic0.

# dlstat show-link vnic0
LINK    IPKTS   RBYTES    OPKTS   OBYTES
vnic0   3       180       0       0
Example 90  Displaying Network Traffic Statistics for a Datalink With Dedicated Hardware Rings

This example shows the receive-side network traffic statistics for the datalink vnic0 that has four dedicated Rx rings. The hw value under the ID column in the output indicates that the datalink vnic0 has dedicated hardware rings.

# dlstat show-link -r vnic0
LINK   TYPE      ID  INDEX    IPKTS   RBYTES    INTRS    POLLS   IDROPS
vnic0    rx   local     --        0        0        0        0        0
vnic0    rx   other     --       64    2.94K        0        0        0
vnic0    rx      hw      8        0        0        0        0        0
vnic0    rx      hw      9       53    7.97K       53        0        0
vnic0    rx      hw     10        4      392        4        0        0
vnic0    rx      hw     11  153.65K  220.68M  153.65K        0        0
Example 91  Displaying Transmit-Side Network Traffic Statistics for a Datalink

This example shows the transmit-side network traffic statistics for the datalink vnic0.

# dlstat show-link -t vnic0
LINK   TYPE      ID  INDEX    OPKTS   OBYTES   ODROPS
vnic0    tx   local     --        0        0        0
vnic0    tx   other     --       19      798        0
vnic0    tx      sw     --        0        0        0
Example 92  Displaying Network Traffic Statistics for a Datalink Without Dedicated Hardware Rings

This example shows the network traffic statistics for the datalink net6 that does not have dedicated Rx rings. The sw value under the ID column in the output indicates that the datalink net6 is not configured with dedicated hardware rings.

# dlstat show-link -r net6
LINK  TYPE      ID  INDEX    IPKTS   RBYTES INTRS POLLS   IDROPS
net6    rx   local     --        0   0        0     0        0
net6    rx   other     --        0   0        0     0        0
net6    rx      sw     --        0   0        0     0        0

Displaying Network Traffic Statistics of Link Aggregations

The dlstat show-aggr command shows network packet statistics for each aggregation's ports when traffic traverses the aggregation on the system.

Example 93  Displaying Network Traffic Statistics for Link Aggregations
# dlstat show-aggr
LINK      PORT    IPKTS   RBYTES    OPKTS   OBYTES
aggr0     --         13      832       13      780
aggr0     net0        0        0       13      780
aggr0     net3       13      832        0        0

In this example, the output indicates the configuration of a link aggregation aggr0 with two underlying links, net0 and net3. As network traffic is received or sent by the system through the aggregation, information about incoming and outgoing packets and their respective sizes is reported for every port. The ports are identified by the underlying links of the aggregation.

For information about link aggregations, see Chapter 2, Configuring High Availability by Using Link Aggregations in Managing Network Datalinks in Oracle Solaris 11.3.

Displaying Network Traffic Statistics of Bridges

The dlstat show-bridge command shows network statistics for each bridge and lists the statistics of the links connected to each bridge.

Example 94  Displaying Network Traffic Statistics for Bridges

In this example, the network statistics for the bridges rbblue0 and stbred0 are displayed.

# dlstat show-bridge
BRIDGE        LINK     IPKTS    RBYTES     OPKTS    OBYTES     DROPS  FORWARDS
rbblue0         --     1.93K   587.29K     2.47K     3.30M         0         0
             simblue1     72     4.32K     2.12K     2.83M         0        --
             simblue2  1.86K   582.97K       348   474.04K         0        --
stbred0         --       975   976.69K     3.44K     1.13M         0        38
              simred3    347   472.54K     1.86K   583.03K         0        --
              simred4    628   504.15K     1.58K   551.51K         0        --