The dlstat show-phys command provides statistics that refer to the physical network device. As shown in Figure 8–1, 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] [link] [interval [count]]
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.
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.
Displays the current time in internal representation.
Displays the current time in standard date format.
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.
Specifies the time in seconds at which you want to refresh the network statistics.
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.
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:
Physical or virtual datalink, identified by a name
Number of inbound packets on the link
Number of bytes received on the link
Number of outbound packets on the link
Number of bytes sent on this link
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 8-3 Displaying Receive-Side Traffic Statistics for a Network DeviceIn 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 8-4 Displaying Transmit-Side Traffic Statistics for a Network DeviceIn 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 0Example 8-5 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