System Administration Commands dlstat(1M) NAME dlstat - report data links statistics SYNOPSIS dlstat show [-r | -t] [-i interval] [-s] [-h] [link[,...]] dlstat show [-w] [-H] [-k] [-p] [-i interval] [-s] [-h] [ -o [- | +] field[,...]] [link[,...]] dlstat show -g [-w] [-H] [-k] [-i interval] [ -o [- | +] field[,...]] [link[,...]] dlstat show-history [-a] -f filename [-d] [-F format] [-s time] [-e time] [link[,...]] dlstat reset [link[,...]] DESCRIPTION The dlstat command reports run time statistics about data links. dladm show-link lists the link names input to this command. SUBCOMMANDS The following subcommands are supported: dlstat show [-r | -t] [-i interval] [-s] [-h] [link[,...]] Iteratively examines all links and reports statistics. The output is sorted in descending order of link utilization. If no link is specified, the system displays statistics for all links. The traffic statistics are displayed per link and not per physical device. For example, for VNIC configured on a physical link, traffic flowing through the VNIC would not reflect in the statistics for the underlying link. However, link stats would be inclusive of traffic matching user defined flows configured on top of that link. -i interval Used to specify an interval, in seconds, at which statistics would be refreshed. Default interval is one second. -r Display receive side statistics only. Includes bytes and packets received, hardware and software drops etc. See examples for complete listing. -t Display transmit side statistics only. Includes bytes and packets sent, drops etc. See examples below. -s Display per software lane statistics. See examples below. -h Display per hardware lane statistics. See examples below. dlstat show [-w] [-H] [-k] [-p] [-i interval] [-s] [-h] [ -o [- | +] field[,...]] [link[,...]] Detailed view of the statistics. Supports choosing specific statistics to display. -w Overprints the reports in full screen mode rather than printing reports one below another. -H Print output header after every interval. -k Displays all supported statistics for the specified one row per field. -p Display using a stable machine-parseable format. -o - or -o + are not compatible with this option. However, -o fields[,...] works fine with it. -i interval Used to specify an interval, in seconds, at which statistics would be refreshed. Default interval is one second. -s Display per software lane statistics. See examples below. -h Display per hardware lane statistics. See examples below. -o [- | +] field[,...] When invoked without suboption - or +, it provides a way to select specific output fields one is interested in. The field name must be one of the fields listed below, or the special value all to display all supported fields. List of rx side fields: link iusedby ibytes ierrors ipktchainsize0-10 ipktchainsize10-50 ipktchainsize50+ iavgqlen ipktdrop ipktsize0-64 ipktsize64-256 ipktsize256-1024 ipktsize1024+ ibwctl_pktdrop intrcpu pollcpu intrcount pollcount In addition, following fields are supported for rx side: in displays link, ipackets, ibytes, ierrors, ipktdrop displays additional column iusedby when invoked with -h ipktchainsize displays ipktchainsize0-10, ipktchainsize10-50, ipktchainsize50+ ipktsize displays ipktsize0-64, ipktsize64-256, ipktsize256-1024, ipktsize1024+ intrpollcount displays intrcpu, pollcpu, intrcount, pollcount iavgqlen, ipktdrop List of tx side fields: link opackets obytes oerrors opktchainsize0-10 opktchainsize10-50 opktchainsize50+ oavgqlen opktdrop opktsize0-64 opktsize64-256 opktsize256-1024 opktsize1024+ obwctl_pktdrop In addition, following fields are supported for tx side: out displays link, opackets, obytes, oerrors opktchainsize displays opktchainsize0-10, opktchainsize10-50, opktchainsize50+ opktsize displays opktsize0-64, opktsize64-256, opktsize256-1024, opktsize1024+ - field[,...]] Drop the listed fields from the display. It continues to display all other fields that it would have displayed without this option. + field[,...]] Add listed fields in the display. It continues to display the fields it would have displayed without this option. dlstat show -g [-w] [-H] [-k] [-i interval] [ -o [- | +] field[,...]] [link[,...]] Displays aggregate statistics such as percentage of packets received via polling, minimum, maximum and average queue length, packet and chain sizes. See examples for complete list. -w Overprints the reports in full screen mode rather than printing reports one below another. -H Print output header after every interval. -k Displays all supported statistics for the specified link(s). -i interval Used to specify an interval, in seconds over which aggregate statistics would be computed. Default interval is one second. -o field[,...] A case-insensitive, comma-separated list of output fields to display. The field name must be one of the fields listed in the examples below. By default, it displays following fields: link, %rx, %tx, avg_qlen, avg_pktsize avg_chainsize. -o [- | +] field[,...] When invoked without suboption - or +, it provides a way to select specific output fields one is interested in. By default, it displays following fields: link, %rx, %tx, avg_qlen, avg_pktsize avg_chainsize. For complete listing, see examples below. - field[,...]] Drop the listed fields from the display. It continues to display all other fields that it would have displayed without this option. + field[,...]] Add listed fields in the display. It continues to display the fields it would have displayed without this option. dlstat show-history [-a] -f filename [-d] [-F format] [-s time] [-e time] [link[,...]] Show the network usage history from a stored extended accounting file. Configuration and enabling of net accounting through acctadm(1m) is required. The default output will be the summary of network history usage of the existing links for their entire period of time in which extended accounting was enabled. -a Display all historical network usage for the specified period of time while extended accounting is enabled. This includes the usage history information for the links that have already been deleted. -f filename Read extended accounting records of network usage history from filename. -d Display the dates for which there is logging information. The date is in the format MM/DD/YYYY. -F format Specifies the output format of the network usage history information. As of this release, gnuplot is the only supported format. -s time -e time Start and stop times for data display. Time is in the format MM/DD/YYYY,hh:mm:ss. link[,...] If specified, display the historical network usage only for the named link(s). Otherwise, display historical network usage for all links. dlstat reset [link[,...]] Resets the link statistics counters for the specified link(s). If invoked without specifying any link, it resets statistics for all the links. EXAMPLES Example 1 Display statistics To display statistics for all the links, enter following command. Statistics are displayed as 3 digit numbers with appropriate unit. Default interval is one second. # dlstat show LINK IPKTS IBYTES OPKTS OBYTES UTIL e1000g0 21.2K 2.1M 0.5K 44.2M 0.0% ixgbe0 24.5M 13.6G 3.5M 0.1G 0.0% vnic1 0.0M 0.0M 0.0M 0.0M 0.0% LINK IPKTS IBYTES OPKTS OBYTES UTIL e1000g0 21.6K 2.1M 0.5K 46.2M 0.0% ixgbe0 26.5M 26.1G 7.0M 0.3G 0.0% vnic1 0.0M 0.0M 0.0M 0.0M 0.0% . . . . . . . . . . . . . . . . . . Example 2 Display rx side statistics # dlstat show -r LINK IPKTS IBYTES INTRS POLLS HDRPS SDRPS CH<10 CH10-50 CH>50 UTIL e1000g0 21.2K 2.1M 22.3K 78.0 0.0 0.0 57.0 0.0 0.0 0.0% ixgbe0 24.5M 13.6G 0.8K 10.7M 0.0 0.0 0.3M 2.96M 32.5K 0.0% vnic1 24.5M 13.6G 0.8K 10.7M 0.0 0.0 0.3M 2.96M 32.5K 0.0% Example 3 Display per Lane rx side statistics # dlstat show -r -h ixgbe0 LINK:HLNE USEDBY IPKTS IBYTES INTRS POLLS HDRPS SDRPS CH<10 CH10-50 CH>50 UTIL ixgbe0:0 ixgbe0 24.5M 13.6G 0.8K 10.7M 0.0 0.0 0.3M 2.96M 32.5K 0.0% ixgbe0:1 ixgbe0 24.5M 13.6G 0.8K 10.7M 0.0 0.0 0.3M 2.96M 32.5K 0.0% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # dlstat show -r -s LINK:SLNE USEDBY IPKTS IBYTES DRPS ixgbe0:0 ixgbe0 24.5M 13.6G 0.8K ixgbe0:1 ixgbe0 24.5M 13.6G 0.8K # dlstat show -r -s -h LINK:HLNE SLNE USEDBY IPKTS IBYTES DRPS UTIL ixgbe0:0 0 ixgbe0 24.5M 13.6G 0.8K 0.0% ixgbe0:0 1 ixgbe0 24.5M 13.6G 0.8K 0.0% ixgbe0:0 2 ixgbe0 24.5M 13.6G 0.8K 0.0% ixgbe0:1 0 ixgbe0 24.5M 13.6G 0.8K 0.0% ixgbe0:1 1 ixgbe0 24.5M 13.6G 0.8K 0.0% ixgbe0:1 2 ixgbe0 24.5M 13.6G 0.8K 0.0% . . . . . . . . . . . . . . . . . . . . . Example 4 Display tx side statistics To display Tx side statistics after every 5 seconds: # dlstat show -t 5 LINK OBYTES OPKTS DROPS FLOWCTL UTIL bge0 0.0 0.0 0.0 0.0 0.0% e1000g0 0.0 0.0 0.0 0.0 0.0% ixgbe0 0.0 0.0 0.0 0.0 0.0% stub1 0.0 0.0 0.0 0.0 0.0% LINK OBYTES OPKTS DROPS FLOWCTL UTIL bge0 0.0 0.0 0.0 0.0 0.0% e1000g0 0.0 0.0 0.0 0.0 0.0% ixgbe0 0.0 0.0 0.0 0.0 0.0% stub1 0.0 0.0 0.0 0.0 0.0% LINK OBYTES OPKTS DROPS FLOWCTL UTIL bge0 0.0 0.0 0.0 0.0 0.0% . . . . . . . . . . . . . . . . . . Example 5 Display per Lane tx side statistics # dlstat show -t -h ixgbe0 LINK:HLANE OBYTES OPKTS DROPS FLOWCTL UTIL ixgbe0:0 0.0 0.0 0.0 0.0 0.0% Example 6 Choosing to display statistics of interest Following command will drop packet chain size counts from the default output but would display interrupt and poll cpu associated with each lane. # dlstat show -r -h -o -ipktchainsize, +intrcpu, +pollcpu ixgbe0 LINK:HLNE USEDBY IPKTS IBYTES INTRS POLLS HDRPS SDRPS INTRC POLLC UTIL ixgbe0:0 ixgbe0 24.5M 13.6G 0.8K 10.7M 0.0 0.0 0 1 0.0% ixgbe0:1 ixgbe0 24.5M 13.6G 0.8K 10.7M 0.0 0.0 2 3 0.0% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example 7 Display all available statistics for all the lanes # dlstat show -h -k ixgbe0 link: ixgbe0 type: tx hlane: 0 ousedby ixgbe0 opackets 0 obytes 0 oerrors 0 opktchainsize0-10 0 opktchainsize0-50 0 opktchainsize50+ 0 oavgqlen 0 opktdrop 0 opktsize0-64 0 opktsize64-256 0 opktsize256-1024 0 opktsize1024+ 0 workercpu 0 obwctl_pktdrop 0 blockcount 0 unblockcount 0 hlane: 1 ousedby ixgbe0 opackets 0 . . . . . . type: rx hlane: 0 iusedby ixgbe0 ipackets 0 ibytes 0 ierrors 0 ipktchainsize0-10 0 ipktchainsize10-50 0 ipktchainsize50+ 0 iavgqlen 0 ipktdrop 0 ipktsize0-64 0 ipktsize64-256 0 ipktsize256-1024 0 ipktsize1024+ 0 ibwctl_pktdrop 0 intrcpu 0 pollcpu 0 intrcount 0 pollcount 0 hlane: 1 iusedby vnic1 ipackets 0 . . . . . . Example 8 Display aggregate statistics To display statistics aggregated over 30 seconds time interval: # dlstat show -g -i 30 nxge0 LINK RX TX AVG_QLEN AVG_PKTSIZE AVG_CHAINSIZE nxge0 0.0% 0.0% 0.0 0.0 0.0 # dlstat show -g -k -i 30 link: ixgbe0 %rx packets 0 Scheduling: % packets polled 0 min_qlen 0 max_qlen 0 avg_qlen 0 min_pktsize 0 max_pktsize 0 avg_pktsize 0 min_chainsize 0 max_chainsize 0 avg_chainsize 0 link: ixgbe1 %rx packets 0 Scheduling: . . . . . . Example 9 Show historical network usage history Network usage history statistics can be stored using the extended accounting facility, acctadm(1m). # acctadm -e basic -f /var/log/net.log net # acctadm net Network accounting: active Network accounting file: /var/log/net.log Tracked Network resources: basic Untracked Network resources: src_ip,dst_ip,src_port,dst_port,protocol, dsfield The saved historical data can be retrieved in summary form using: # dlstat show-history -f /var/log/net.log LINK DURATION IPACKETS RBYTES OPACKETS OBYTES BANDWIDTH e1000g0 80 1031 546908 0 0 2.44 Kbps ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: /usr/sbin ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWcsu | |_____________________________|_____________________________| | Interface Stability | Committed | |_____________________________|_____________________________| SEE ALSO acctadm(1M), dladm(1M), ifconfig(1M), kstat(1M), netstat(1M), attributes(5)