Statistics on flows help you to evaluate packet traffic on all the defined flows on a system.To display the statistics on flows, use theflowstat command. For moreinformation, see theflowstat(8) man page.
Use the following command syntax to display network traffic statistics on flows:
$flowstat [-r|-t] [-llink] \[-Tu | -Td] [flow] [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–t option, both thetransmit-side and receive-side network statistics are displayed.
Displays transmit-side network traffic statistics only. You should not the specify the–r option with this option.
If you do not specify the–r option or the–t option, both thetransmit-side and receive-side network statistics are displayed.
Name of the datalink whose network statistics you want to monitor. If you do not specify thedatalink, then the information about all the configured flows on the system are displayed.
Displays the current time in internal representation.
Displays the current time in standard date format.
Name of the flow whose network statistics you want to monitor. If you do not specify the flow,then depending on the specified link, all the flow statistics are displayed.
Specifies the time in seconds at which you want to refresh the network statistics. If you donot specify the interval value, then the total number of packets and bytes is displayed.
Specifies the number of times you want the displayed network traffic statistics to berefreshed. If you do not specify the count value, the statistics are refreshed indefinitely.
The following examples show different ways to display information about configured flows onthe system.
Example 102 Displaying Network Traffic Statistics for FlowsIn this example, network traffic statistics for all the configured flows on the system aredisplayed with an interval value of1 second and the count value of2.
$flowstat 1 2FLOW IPKTS RBYTES IDROPS OPKTS OBYTES ODROPSflow1 1.78M 2.68G 443 889.57K 58.72M 0flow2 0 0 0 0 0 0flow1 8.31K 12.51M 243 4.22K 280.45K 0flow2 0 0 0 0 0 0
Consider the flows,flow1 andflow2, as a set. The firstset of flows,flow1 andflow2, show the total number ofnetwork traffic statistics received and transmitted by the flows. In this example,1.78M is the total number of packets received byflow1. Thesecond set of flows,flow1 andflow2, show the networkstatistics in rates per second, also known as the normalized value. In this example,8.31K is the normalized value of the packets received byflow1in the interval of1 second.
Example 103 Displaying Transmit-Side Traffic Statistics for FlowsIn this example, the network traffic statistics about outgoing traffic for all the configuredflows on the system are displayed.
$flowstat -tFLOW OPKTS OBYTES ODROPSflow1 24.37M 1.61G 0flow2 0 0 0Example 104 Displaying Receive-Side Traffic Statistics for Flows on a Datalink
In this example, incoming network traffic for all the configured flows on the datalinknet0 are displayed with an interval value of2 seconds and thecount value of5.
$flowstat -r -l net0 2 5FLOW IPKTS RBYTES IDROPSflow1 2.38M 3.59G 14.89Kflow2 0 0 0flow1 8.24K 12.40M 180flow2 0 0 0flow1 8.94K 13.47M 206flow2 0 0 0flow1 7.43K 11.19M 161flow2 0 0 0flow1 8.38K 12.62M 213flow2 0 0 0
Consider the flows,flow1 andflow2, as a set. The firstset of flows,flow1 andflow2, show the total number ofpackets and bytes received by the flows. In this example,2.38M is the totalnumber of packets received and3.59G is the total number of bytes received byflow1. The second set of flows,flow1 andflow2, show the network statistics in rates per second, also known as thenormalized value. In this example,8.24K is the normalized value of the packetsreceived byflow1 in the interval of2 seconds. Similarly, thesucceeding sets of flows also show the normalized value for the network traffics statistics in theperiodic interval of2 seconds.
Example 105 Displaying Traffic Statistics for Flows With TimeThe following example displays statistics about incoming traffic on all the flows that arecreated over the datalinknet0 with the internal representation of the currenttime.
$flowstat -r -l net0 -Tu1364380279 FLOW IPKTS RBYTES IDROPS tcp-flow 183.11K 270.24M 0 udp-flow 0 0 0
The following example displays statistics about incoming traffic on all the flows that arecreated over the datalinknet0 with the current time in standard dateformat.
$flowstat -r -l net0 -TdWednesday, March 27, 2013 04:01:011 PM IST FLOW IPKTS RBYTES IDROPS tcp-flow 183.11K 270.24M 0 udp-flow 0 0 0