Querying Networking Statistics: dlstat(1M)
Posted
by user12612042
on Oracle Blogs
See other posts from Oracle Blogs
or by user12612042
Published on Mon, 11 Nov 2013 00:28:37 +0000
Indexed on
2013/11/11
10:10 UTC
Read the original article
Hit count: 645
/Sun
From Solaris 11 onwards, we introduced a command line tool viz. dlstat(1M) to query network statistics. dlstat (for datalink statistics) is a statistics querying counterpart for dladm(1M) - the datalink administration tool.
The tool is very easy to get started. Just type dlstat on a shell prompt on Solaris 11 (or later). For example,:
# dlstat
LINK IPKTS RBYTES OPKTS OBYTES
net0 834.11K 145.91M 575.19K 104.24M
net1 7.87K 2.04M 0 0
In this example, the system has two datalinks net0 and net1. The output columns denote input packets/bytes as well as output packets/bytes. The numbers are abbreviated in xxx.xxUnit format. However, one could get the actual counts by simply running dlstat -u R (R for raw):
# dlstat -u R
LINK IPKTS RBYTES OPKTS OBYTES
net0 834271 145931244 575246 104242934
net1 7869 2036958 0 0
In addition, dlstat also supports various subcommands
dlstat help
The following subcommands are supported:
Stats : show-aggr show-ether show-link show-phys
show-bridge
For more info, run: dlstat help {default|
I will only describe couple of interesting subcommands/options here. For a comprehensive description of all the dlstat subcommands refer dlstat's official manual .
For NICs that support multiple rings (e.g. ixgbe), dlstat show-phys -r allows us to query per Rx ring statistics. For example:
dlstat show-phys -r net4
LINK TYPE INDEX IPKTS RBYTES
net4 rx 0 0 0
net4 rx 1 0 0
net4 rx 2 0 0
net4 rx 3 0 0
net4 rx 4 0 0
net4 rx 5 0 0
net4 rx 6 0 0
net4 rx 7 0 0
In this case, net4 is just a vanity name for an ixgbe datalink. This view is especially useful if one wants to look at the network traffic spread across all the available rings. Furthermore, any of the dlstat commands could be run with -i
Finally, there is also a quick way to dump ALL the stats. Just run dlstat -A. You probably want to redirect this output to a file because you are going to get a whole load of stats :-).
© Oracle Blogs or respective owner