Statistics on flows help you to evaluate packet traffic on all the defined flows on a system. To display the statistics on flows, use the flowstat command. For more information, see the flowstat (1M) man page.
Use the following command syntax to display network traffic statistics on flows:
# flowstat [–r|–t] [–l link] [–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 the transmit-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 the transmit-side and receive-side network statistics are displayed.
Name of the datalink whose network statistics you want to monitor. If you do not specify the datalink, 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 do not 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 be refreshed. 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 on the system.
Example 8-12 Displaying Network Traffic Statistics for FlowsIn this example, network traffic statistics for all the configured flows on the system are displayed with an interval value of 1 second and the count value of 2.
# flowstat 1 2 FLOW IPKTS RBYTES IDROPS OPKTS OBYTES ODROPS flow1 1.78M 2.68G 443 889.57K 58.72M 0 flow2 0 0 0 0 0 0 flow1 8.31K 12.51M 243 4.22K 280.45K 0 flow2 0 0 0 0 0 0
Consider the flows, flow1 and flow2, as a set. The first set of flows, flow1 and flow2, show the total number of network traffic statistics received and transmitted by the flows. In this example, 1.78M is the total number of packets received by flow1. The second set of flows, flow1 and flow2, show the network statistics in rates per second, also known as the normalized value. In this example, 8.31K is the normalized value of the packets received by flow1 in the interval of 1 second.
Example 8-13 Displaying Transmit-Side Traffic Statistics for FlowsIn this example, the network traffic statistics about outgoing traffic for all the configured flows on the system are displayed.
# flowstat -t FLOW OPKTS OBYTES ODROPS flow1 24.37M 1.61G 0 flow2 0 0 0Example 8-14 Displaying Receive-Side Traffic Statistics for Flows on a Datalink
In this example, incoming network traffic for all the configured flows on the datalink net0 are displayed with an interval value of 2 seconds and the count value of 5.
# flowstat -r -l net0 2 5 FLOW IPKTS RBYTES IDROPS flow1 2.38M 3.59G 14.89K flow2 0 0 0 flow1 8.24K 12.40M 180 flow2 0 0 0 flow1 8.94K 13.47M 206 flow2 0 0 0 flow1 7.43K 11.19M 161 flow2 0 0 0 flow1 8.38K 12.62M 213 flow2 0 0 0
Consider the flows, flow1 and flow2, as a set. The first set of flows, flow1 and flow2, show the total number of packets and bytes received by the flows. In this example, 2.38M is the total number of packets received and 3.59G is the total number of bytes received by flow1. The second set of flows, flow1 and flow2, show the network statistics in rates per second, also known as the normalized value. In this example, 8.24K is the normalized value of the packets received by flow1 in the interval of 2 seconds. Similarly, the succeeding sets of flows also show the normalized value for the network traffics statistics in the periodic interval of 2 seconds.
Example 8-15 Displaying Traffic Statistics for Flows With TimeThe following example displays statistics about incoming traffic on all the flows that are created over the datalink net0 with the internal representation of the current time.
# flowstat -r -l net0 -Tu 1364380279 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 are created over the datalink net0 with the current time in standard date format.
# flowstat -r -l net0 -Td Wednesday, March 27, 2013 04:01:011 PM IST FLOW IPKTS RBYTES IDROPS tcp-flow 183.11K 270.24M 0 udp-flow 0 0 0