You can use the following variants of the dlstat command to display network traffic information.
|
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(8) man page.
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]]
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.
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.
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 90 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 91 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 92 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.91KExample 93 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
You can use the dlstat show-link command to display the network traffic statistics for a datalink.
Example 94 Displaying Network Traffic Statistics for a DatalinkThis example shows the network traffic statistics for the datalink vnic0.
$ dlstat show-link vnic0 LINK IPKTS RBYTES OPKTS OBYTES vnic0 3 180 0 0Example 95 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 0Example 96 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 0Example 97 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
The dlstat show-aggr command shows network packet statistics for each aggregation's ports when traffic traverses the aggregation on the system.
Example 98 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.4.
Example 99 Displaying Per-Ring Statistics for an AggregationWhen you specify –r or –t option with the dlstat show-aggr command, per-ring statistics of the aggregation are displayed.
$ dlstat show-aggr -r LINK PORT INDEX IPKTS RBYTES aggr1 -- -- 7.93M 4.37G aggr1 net4 0 541.37K 298.21M aggr1 net4 1 0 0 aggr1 net4 2 0 0 aggr1 net4 3 1.79M 91.63M aggr1 net4 4 780.47K 433.30M aggr1 net4 5 1 98 aggr1 net4 6 530.05K 292.34M aggr1 net4 7 548.36K 301.74M
$ dlstat show-aggr -t LINK PORT INDEX OPKTS OBYTES aggr1 -- -- 2.23M 146.96M aggr1 net4 0 221.94K 14.65M aggr1 net4 1 147.37K 9.73M aggr1 net4 2 0 0 aggr1 net4 3 83.04K 5.49M aggr1 net4 4 429.10K 28.32M
$ dlstat show-aggr -rt LINK PORT TYPE INDEX IPKTS RBYTES OPKTS OBYTES aggr1 -- -- -- 7.93M 4.37G 2.23M 146.96M aggr1 net4 tx 0 -- -- 221.94K 14.65M aggr1 net4 tx 1 -- -- 147.37K 9.73M aggr1 net4 tx 2 -- -- 0 0 aggr1 net4 tx 3 -- -- 83.04K 5.49M aggr1 net4 tx 4 -- -- 429.10K 28.32M aggr1 net4 tx 5 -- -- 185.15K 12.22M aggr1 net4 tx 6 -- -- 71.54K 4.72M aggr1 net4 tx 7 -- -- 67.62K 4.46M aggr1 net4 rx 0 541.37K 298.21M -- -- aggr1 net4 rx 1 0 0 -- -- aggr1 net4 rx 2 0 0 -- -- aggr1 net4 rx 3 1.79M 991.63M -- -- aggr1 net4 rx 4 780.47K 433.30M -- -- aggr1 net4 rx 5 1 98 -- -- aggr1 net4 rx 6 530.05K 292.34M -- -- aggr1 net4 rx 7 548.36K 301.74M -- --Example 100 Displaying Input and Output Packet Drops for an Aggregation
You can use the dlstat show-aggr command to display the input and output packet drops per aggregation. You can use the following options with the command to display the number of bytes of the drops in addition to the number of input and output packet drops.
# dlstat show-aggr [-o [idrops[,idropbytes][,odrops][,odropbytes]]
The following example displays the input and output packet drop statistics for aggr1.
$ dlstat show-aggr aggr1 -o idrops,idropbytes,odrops,odropbytes -u R IDROPS IDROPBYTES ODROPS ODROPBYTES 125 22.63K 0 0
The dlstat show-bridge command shows network statistics for each bridge and lists the statistics of the links connected to each bridge.
Example 101 Displaying Network Traffic Statistics for BridgesIn 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 --