System Administration Commands dlstat(1M) NAME dlstat - report data links statistics SYNOPSIS dlstat [-r | -t] [-i interval] [link] dlstat [-i interval] [-p] [ -o field[,...]] [-u b|B|K|M|G|T|P] [link] dlstat show-phys [-r | -t] [-i interval] [-p] [ -o field[,...]] [-u b|B|K|M|G|T|P] [link] dlstat show-link [-r [-F] | -t] [-i interval] [-p] [ -o field[,...]] [-u b|B|K|M|G|T|P] [link] dlstat show-link -h [-a] -f filename [-d] [-F format] [-s time] [-e time] [link] dlstat show-aggr [-r | -t] [-i interval] [-p][ -o field[,...]] [-u b|B|K|M|G|T|P] [link] DESCRIPTION The dlstat command reports run time statistics about data links. dladm show-phys lists link names input to dlstat show-phys, dladm show-link lists link names input to dlstat show-link, and dladm show-aggr lists link aggregations input to dlstat show-aggr. dlstat [-r | -t] [-i interval] [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. -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. -i interval Used to specify an interval, in seconds, at which statistics would be refreshed. Default interval is one second. link If specified, display the stats only for the named link. Otherwise, display stats for all links. dlstat [-i interval] [-p] [ -o field[,...]] [-u b|B|K|M|G|T|P] [link] Supports choosing specific statistics to display. -i interval Used to specify an interval, in seconds, at which statistics would be refreshed. Default interval is one second. -p Display using a stable machine-parseable format. -o field[,...] A case-insensitive, comma-separated list of output fields to display. The field name must be one of the fields listed below, or the special value all to display all supported fields. List of supported rx fields: link iusedby ibytes ipkts intrs polls hdrops: hardware drops sdrops: software drops (owing to banwdith enforcement). ch<10: number of packet chains of length < 10. ch10-50: number of packet chains of length between 10 and 50. ch>50: number of packet chains of length > 50. List of tx side fields: link obytes opackets oerrors opktdrop blkcnt ublkcnt -u b|B|K|M|G|T|P Without this option, stats are outputted in format xy.zU where x, y, z are numbers while U is appropriate unit. -u lets us choose unit viz. b:bits, B:bytes, K:Kilobits, M:Megabits,... etc. link If specified, display the stats only for the named link. Otherwise, display stats for all links. dlstat show-phys [-r | -t] [-i interval] [-p] [ -o field[,...]] [-u b|B|K|M|G|T|P] [link] Show statistics for physical device. -r Display per hardware receive ring statistics. Includes bytes and packets received, hardware drops etc. See examples for complete listing. -t Display per hardware transmit ring side statistics. Includes bytes and packets sent, drops etc. See examples for complete listing. -i interval Used to specify an interval, in seconds, at which statistics would be refreshed. Default interval is one second. -p Display using a stable machine-parseable format. -o field[,...] A case-insensitive, comma-separated list of output fields to display. -u b|B|K|M|G|T|P Without this option, stats are outputted in format xy.zU where x, y, z are numbers while U is appropriate unit. -u lets us choose unit viz. b:bits, B:bytes, K:Kilobits, M:Megabits,... etc. link If specified, display the stats only for the named link. Otherwise, display stats for all links. dlstat show-link [-r [-F] | -t] [-i interval] [-p] [ -o field[,...]] [-u b|B|K|M|G|T|P] [link] Show statistics for link. -r Display per hardware receive lane statistics. Includes bytes and packets received, software drops, intr and poll count, chain lengths etc. See examples for complete listing. -F Display software fanout statistics. -t Display per hardware transmit ring side statistics. Includes bytes and packets sent, block and unblock count etc. See examples for complete listing. -i interval Used to specify an interval, in seconds, at which statistics would be refreshed. Default interval is one second. -p Display using a stable machine-parseable format. -o field[,...] A case-insensitive, comma-separated list of output fields to display. -u b|B|K|M|G|T|P Without this option, stats are outputted in format xy.zU where x, y, z are numbers while U is appropriate unit. -u lets us choose unit viz. b:bits, B:bytes, K:Kilobits, M:Megabits,... etc. link If specified, display the stats only for the named link. Otherwise, display stats for all links. dlstat show-link -h [-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. Otherwise, display historical network usage for all links. dlstat show-aggr [-r | -t] [-i interval] [-p][ -o field[,...]] [-u b|B|K|M|G|T|P] [link] Show per port statistics for an aggr. -r Display per port receive side statistics. See examples for complete listing of fields displayed. -t Display per port transmit side statistics. See examples for complete listing of fields displayed. -i interval Used to specify an interval, in seconds, at which statistics would be refreshed. Default interval is one second. -p Display using a stable machine-parseable format. -o field[,...] A case-insensitive, comma-separated list of output fields to display. -u b|B|K|M|G|T|P Without this option, stats are outputted in format xy.zU where x, y, z are numbers while U is appropriate unit. -u lets us choose unit viz. b:bits, B:bytes, K:Kilobits, M:Megabits,... etc. link If specified, display the stats only for the named aggr. Otherwise, display stats for all aggrs. 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 LINK IPKTS IBYTES OPKTS OBYTES UTIL e1000g0 21.2K 2.1M 0.5K 44.2M 0.0% nxge0 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% nxge0 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 -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% nxge0 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 rx hardware ring statistics # dlstat show-phys -r nxge0 LINK RNG USEDBY IPKTS IBYTES INTRS POLLS HDRPS CH<10 CH10-50 CH>50 UTIL nxge0 0 nxge0 0.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% nxge0 1 nxge0 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% nxge0 2 nxge0 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% nxge0 3 nxge0 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% nxge0 4 vnic1 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% nxge0 5 vnic1 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% nxge0 6 vsw1 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% nxge0 7 vsw1 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% Example 4 Display per rx lane statistics # dlstat show-link -r nxge0 LINK LNE LTYP IPKTS IBYTES INTRS POLLS SDRPS CH<10 CH10-50 CH>50 UTIL nxge0 - local 24.5M 13.6G 0.8K 0.0 0.0 0.0 0.0 0.0 0.0% nxge0 - other 24.5M 13.6G 0.8K 0.0 0.0 0.0 0.0 0.0 0.0% nxge0 0 hw 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% nxge0 1 hw 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% nxge0 2 hw 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% nxge0 3 hw 24.5M 13.6G 0.8K 10.7M 0.0 0.3M 2.96M 32.5K 0.0% # dlstat show-link -r e1000g0 LINK LNE LTYP IPKTS IBYTES INTRS POLLS SDRPS CH<10 CH10-50 CH>50 UTIL e1000g0 - local 24.5M 13.6G 0.8K 0.0 0 0 0.0 0.0 0.0 0.0% e1000g0 - other 24.5M 13.6G 0.8K 0.0 0.0 0.0 0.0 0.0 0.0% e1000g0 - sw 24.5M 13.6G 0.8K 0.0 0.0 0.0 0.0 0.0 0.0% Example 5 Display rx side fanout statistics # dlstat show-link -r -F vnic1 LINK LNE LTYP FOUT IPKTS IBYTES vnic1 - local 0 24.5M 13.6G vnic1 - local 1 24.5M 13.6G vnic1 - other 0 24.5M 13.6G vnic1 - other 1 24.5M 13.6G vnic1 0 hw 0 24.5M 13.6G vnic1 0 hw 1 24.5M 13.6G vnic1 1 hw 0 24.5M 13.6G vnic1 1 hw 1 24.5M 13.6G Example 6 Display tx side statistics To display Tx side statistics after every 5 seconds: # dlstat -t 5 LINK OBYTES OPKTS DROPS BLKCNT UBLKCNT UTIL e1000g0 0.0 0.0 0.0 0.0 0.0 0.0% nxge0 0.0 0.0 0.0 0.0 0.0 0.0% vnic1 0.0 0.0 0.0 0.0 0.0 0.0% LINK OBYTES OPKTS DROPS BLKCNT UBLKCNT UTIL e1000g0 0.0 0.0 0.0 0.0 0.0 0.0% nxge0 0.0 0.0 0.0 0.0 0.0 0.0% vnic1 0.0 0.0 0.0 0.0 0.0 0.0% LINK OBYTES OPKTS DROPS BLKCNT UBLKCNT UTIL e1000g0 0.0 0.0 0.0 0.0 0.0 0.0% . . . . . . . . . . . . . . . . . . . . . Example 7 Display per tx hardware ring side statistics # dlstat show-phys -t nxge0 LINK RNG USEDBY OBYTES OPKTS BLKCNT UBLKCNT nxge0 0 shared 0.5M 13.6G 0.0 0.0 . . . . . . . . . . . . . . . . . . . . . Example 8 Display per tx lane statistics # dlstat show-link -t vnic1 LINK LNE LTYP OBYTES OPKTS BLKCNT UBLKCNT vnic1 0 hw 24.5M 13.6G 0.0 0.0 . . . . . . . Example 9 Choosing to display statistics of interest Following command will display a group of statistics fields. # dlstat show-link -r -o LINK,LNE,INTRS,POLLS nxge0 LINK LNE LTYP INTRS POLLS nxge0 - local 0.8K 10.7M nxge0 - other 0.8K 10.7M nxge0 0 hw 0.8K 10.7M nxge0 1 hw 0.8K 10.7M nxge0 2 hw 0.8K 10.7M nxge0 3 hw 0.8K 10.7M Example 10 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-link -h -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 | See below. | |_____________________________|_____________________________| Screen output is Uncommited. The invocation is Commited. SEE ALSO acctadm(1M), dladm(1M), ifconfig(1M), kstat(1M), netstat(1M), attributes(5)