FLOWSTAT(1M) |
Maintenance Commands |
FLOWSTAT(1M) |
NAME
flowstat - display bandwidth statistics for a single flow, or all flows, on a link created by flowadm(1M)
SYNOPSIS
flowstat [-r |
-t] [
-i interval]] [
-l link] [
flow]
flowstat [-p | -u R|K|M|G|T|P] [-o field[,...]] [-l link] [flow]
flowstat [-A] [-l link] [flow]
flowstat [-S] [-i interval] [-l link] [flow]
flowstat -h [-a] [-d] [-F format] [-s <DD/MM/YYYY,HH:MM:SS>]
[-e <DD/MM/YYYY,HH:MM:SS>] [-f <logfile>] [flow]
DESCRIPTION
The
flowstat command displays bandwidth statistics on flows created using
flowadm(1M). This information includes packets received and transmitted, bytes received and transmitted, and errors received and transmitted.
Options
Each
flowstat subcommand has its own set of options. However, many of the subcommands have the following as a common option:
[
-l link] [
flow]
link refers to a physical or virtual interface while flow refers to a network bandwidth resource created using flowadm(1M). If a link is specified without a flow, the data returned will be for all flows active on the link. If a flow is specified without a link, the data will be returned if the flow is found active on any link. flow names must be unique across all active links.
SUB-COMMANDS
The flowstat command may be invoked in the following ways:
flowstat [
-?]
Display a usage message.
flowstat [
-r |
-t] [
-i interval] [
-l link] [
flow]
Display received or transmitted packets on a specified link or flow with an optional interval. If no flow is specified, statistics for all flows will be displayed. Output is sorted in descending order of flow utilization.
-r
Display receive-side packet statistics which includes the amount of packets received, bytes received, and errors encountered.
-t
Display transmit-side packet statistics which includes the amount of packets transmitted, bytes transmitted, and errors encountered.
-i interval
Specify an interval in seconds to refresh statistics. The default interval is one second.
flowstat [
-p |
-u R|K|M|G|T|P] [
-o field[,...]] [
-l link] [
flow]
Display some or all of the flow statistics in a particular format. Note that if
-p is specified then
-o is required.
-p
The output is displayed in a machine-parseable format.
-u R|K|M|G|T|P
Display the statistics in a chosen unit. One of (R)aw Numbers, (K)ilobits, (M)egabits, (G)igabits, (T)erabits or (P)etabits.
-o field[,...]
Display a list of output fields which must be comma separated. Valid fields are listed below.
List of supported RX fields:
-
flow
-
The name of the flow that is currently active on
a link.
-
rbytes
-
The total number of bytes received on a flow or
a link if a flow is not specified.
-
ipkts
-
The total number of packets received on a flow
or a link if a flow is not specified.
-
ierrs
-
The total number of errors seen on the a link
or flow while receiving data.
List of supported TX fields:
-
flow
-
The name of the flow that is currently active on
a link.
-
obytes
-
The total number of bytes transmitted on a flow
or a link if a flow is not specified.
-
opkts
-
The total number of packets transmitted on a
flow or a link if a flow is not specified.
-
oerrs
-
The total number of errors seen on a link or
flow while transmitting data.
flowstat -A [
-l link] [
flow]
Display all statistics for a single flow, or all flows if none is specified.
-A
Display all statistical information for the flow specified or all flows.
flowstat -S [
-i interval] [
-l link] [
flow]
Display a continuously updated real-time view of statistics from the link or flow.
-S
Display updated statistics in a dynamic real-time view of an active link or flow.
-i interval
Specify an interval in seconds to refresh statistics. The default interval is one second.
flowstat -h [
-a] [
-d] [
-F format] [
-s <DD/MM/YYYY,HH:MM:SS>] [
-e <DD/MM/YYYY,HH:MM:SS>] [
-f logfile] [
flow]
Display historical statistical information for a single flow, or all flows if none is specified.
-h
Use historical information generated from extended accounting. This option must be used with the -f option to specify the logfile where the historical data is written to. See acctadm(1M) for information on enabling extended accounting.
-a
Displays all historical network usage. The only works once extended accounting is enabled. It includes usage information for the flows that have already been deleted.
-d
Display dates where logging information exists in the format MM/DD/YYYY.
-F format
Displays the network flow usage in a format specified. The only format currently supported is gnuplot.
-s starttime
Define the start-time for which to display flow data which is of the format YYYY.MM.DD,hh:mm:ss. This option must be used with -e.
-e endtime
Define the end-time for which to display flow data which is of the format YYYY.MM.DD,hh:mm:ss. This option must be used with -s.
-f logfile
The logfile contains flow data captured from enabling extended accounting using acctadm(1M).
EXAMPLES
Example 1 Display received packets on a particular flow
The command below displays received packet data for the flow ssh-1 on the link e1000g0 over an interval of 2 seconds.
#
flowstat -r -i 2 -l e1000g0 ssh-1
FLOW IPKTS RBYTES IERRS
ssh-1 382 32.10K 0
ssh-1 3 202 0
Example 2 Display all statistics for a particular flow.
The following command displays all statistics available for the flow ssh-1 on the link e1000g0.
#
flowstat -A -l e1000g0 ssh-1
ssh-1
ipackets 766
rbytes 64474
opackets 464
obytes 56516
Example 3 Display historical flow statistics.
The following command displays flow statistics captured when using the extended accounting facility acctadm(1M).
#
flowstat -h -a -s 11/06/2015,16:02:51 -e 11/06/2015,16:04:31 \
-f /var/adm/acct/flowlog.log
FLOW START END RBYTES OBYTES BANDWIDTH
ssh-1 16:02:51 16:03:11 0 0 0 Mbps
ssh-1 16:03:11 16:03:31 0 0 0 Mbps
ssh-1 16:03:31 16:03:51 756 876 0 Mbps
ssh-1 16:03:51 16:04:11 0 0 0 Mbps
ssh-1 16:04:11 16:04:31 5564 3228 0.003 Mbps
EXIT STATUS
0
All actions were performed successfully.
>0
An error occurred.
STABILITY
The invocation is committed. The output of the command is Not-an-Interface; however, the machine-parseable output of the command is committed.
SEE ALSO
acctadm(1M), dladm(1M), flowadm(1M), ifconfig(1M), prstat(1M), route(1M), attributes(5), dlpi(7P)