Sunday, 21 October 2018

Managing network resources in Solaris 11 using “dlstat” and “flowstat” By Devan

Managing network resources in Solaris 11 using “dlstat” and “flowstat”

The 2 important commands to manage network resources in Solaris 11 are “dlstat” and “flowstat”. The post is a short note on the usage of these commands to display and manage network resources.

dlstat Command

The dlstat command reports runtime statistics about datalinks. The output is sorted in descending order of link utilization. dlstat enables you to:
  • Examine all links and reports statistics
  • Examine a specific link and reports statistics
  • Examine physical network devices and reports statistics
  • Examine link aggregations and reports statistics
  • Specify the sampling interval and count values

dlstat: Examples

The section shows examples of dlstat usage. In the first example, running dlstat without subcommands displays a summary of statistics for all the links. The report shows incoming traffic (IPKTS and RBYTES) and outgoing traffic (OPKTS and OBYTES).
# dlstat
LINK           IPKTS     RBYTES    OPKTS      OBYTES
net1           0         0         0          0 
net2           0         0         0          0 
net3           0         0         155        10.43K 
net0           0         0         6.73K      765.05K
speedway0      59.02K    5.93K     115.69K    148.09M
In the second example, the show-phys subcommand reports network traffic statistics for each physical network device. Note that if your link aggregations (speedway0) are present, they are also displayed.
# dlstat show-phys
LINK    IPKTS      RBYTES     OPKTS    OBYTES
net1    2.90K      501.69K    9.02K    5.03M
net2    4.78K      627.83K    16.47K   20.59M
net3    10.73K     1.34M      26.00K   32.64M
net0    49.49K     4.45M      70.83K   90.65M
The show-link subcommand reports network traffic statistics for each network link, whereas the show-aggr subcommand reports incoming and outgoing network traffic statistics for aggregated links. The PORT field indicates the devices that make up the link aggregation.
# dlstat show-link
LINK        IPKTS    RBYTES    OPKTS    OBYTES
net1        0        0         0        0 
net2        0        0         0        0 
net3        0        0         155      10.43K 
net0        0        0         6.73K    765.06K
speedway0   59.16K   5.94K     115.75K  148.09M
# dlstat show-aggr LINK
LINK             PORT      IPKTS     RBYTES       OPKTS      OBYTES  
speedway0        --        68.08K    6.93M        122.66K    148.92M
speedway0        net0      49.59K    4.46M        70.84K     90.65M
speedway0        net1       2.92K    505.13K      9.05K      5.03M
speedway0        net2       4.81K    631.91K      16.76K     20.59M
speedway0        net3      10.76K    1.34M        26.01K     32.64M
# dlstat show-bridge
BRIDGE      LINK    IPKTS    RBYTES   OPKTS  OBYTES   DROPS   FORWARDS
tonowhere   --      2        191      9      702      0       0
            net0    2        191      6      447      0       -- 
            net3    0        0        3      255      0       --

flowstat Command

Flows consist of network packets that are organized according to an attribute. Flows enable you to further allocate network resources. Packets traverse a path when they flow into or out of a system. On a granular level, packets are received and transmitted through receive (Rx) rings and transmit (Tx) rings of an NIC. From these rings, received packets are passed up the network stack for further processing while outbound packets are sent to the network.
Flowstat Enables you to gather runtime statistics on user-defined flows. Using flowstat, you can:
  • Display receive-side statistics only (includes bytes)
  • Display transmit-side statistics only
  • Specify an interval in seconds at which statistics are refreshed along with a count value. The default interval is one second.
  • Display statistics for all flows on the specified link or statistics for the specified flow

flowstat: Examples

1. Below example shows information every second about incoming and outgoing traffic on all configured flows on the system.
# flowstat 1 1
FLOW     IPKTS     RBYTES     IDROPS   OPKTS      OBYTES    ODROPS 
http1    430.45K   910.46M    0        398.22K    44.09M    0
2. The second example shows receive-side statistics for all flows.
# flowstat -r
FLOW    IPKTS     RBYTES       IDROPS
http1   2.95M     3.44M        0
3. The third example shows transmit-side statistics for all flows.
# flowstat -t
FLOW     OPKTS     OBYTES     ODROPS 
http1    17.89M    987.22M    0

No comments:

Post a Comment