1 FLOWSTAT(1M)                 Maintenance Commands                 FLOWSTAT(1M)
   2 
   3 
   4 
   5 NAME
   6        flowstat - display bandwidth statistics for a single flow, or all
   7        flows, on a link created by flowadm(1M)
   8 
   9 SYNOPSIS
  10        flowstat [-r | -t] [-i interval]] [-l link] [flow]
  11 
  12 
  13        flowstat [-p | -u R|K|M|G|T|P] [-o field[,...]] [-l link] [flow]
  14 
  15 
  16        flowstat [-A] [-l link] [flow]
  17 
  18 
  19        flowstat [-S] [-i interval] [-l link] [flow]
  20 
  21 
  22        flowstat -h [-a] [-d] [-F format] [-s <DD/MM/YYYY,HH:MM:SS>]
  23             [-e <DD/MM/YYYY,HH:MM:SS>] [-f <logfile>] [flow]
  24 
  25 
  26 DESCRIPTION
  27        The flowstat command displays bandwidth statistics on flows created
  28        using flowadm(1M). This information includes packets received and
  29        transmitted, bytes received and transmitted, and errors received and
  30        transmitted.
  31 
  32 
  33 
  34    Options
  35        Each flowstat subcommand has its own set of options. However, many of
  36        the subcommands have the following as a common option:
  37 
  38        [-l link] [flow]
  39 
  40            link refers to a physical or virtual interface while flow refers to
  41            a network bandwidth resource created using flowadm(1M). If a link
  42            is specified without a flow, the data returned will be for all
  43            flows active on the link. If a flow is specified without a link,
  44            the data will be returned if the flow is found active on any link.
  45            flow names must be unique across all active links.
  46 
  47 
  48 SUB-COMMANDS
  49        The flowstat command may be invoked in the following ways:
  50 
  51        flowstat [-?]
  52            Display a usage message.
  53 
  54 
  55        flowstat [-r | -t] [-i interval] [-l link] [flow]
  56            Display received or transmitted packets on a specified link or flow
  57            with an optional interval. If no flow is specified, statistics for
  58            all flows will be displayed. Output is sorted in descending order
  59            of flow utilization.
  60 
  61 
  62            -r
  63                Display receive-side packet statistics which includes the
  64                amount of packets received, bytes received, and errors
  65                encountered.
  66 
  67 
  68            -t
  69                Display transmit-side packet statistics which includes the
  70                amount of packets transmitted, bytes transmitted, and errors
  71                encountered.
  72 
  73 
  74            -i interval
  75                Specify an interval in seconds to refresh statistics. The
  76                default interval is one second.
  77 
  78 
  79 
  80        flowstat [-p | -u R|K|M|G|T|P] [-o field[,...]] [-l link] [flow]
  81            Display some or all of the flow statistics in a particular format.
  82            Note that if -p is specified then -o is required.
  83 
  84            -p
  85                The output is displayed in a machine-parseable format.
  86 
  87 
  88            -u R|K|M|G|T|P
  89                Display the statistics in a chosen unit. One of (R)aw Numbers,
  90                (K)ilobits, (M)egabits, (G)igabits, (T)erabits or (P)etabits.
  91 
  92 
  93            -o field[,...]
  94                Display a list of output fields which must be comma separated.
  95                Valid fields are listed below.
  96 
  97                List of supported RX fields:
  98 
  99                    flow   The name of the flow that is currently active on
 100                           a link.
 101 
 102                    rbytes The total number of bytes received on a flow or
 103                           a link if a flow is not specified.
 104 
 105                    ipkts  The total number of packets received on a flow
 106                           or a link if a flow is not specified.
 107 
 108                    ierrs  The total number of errors seen on the a link
 109                           or flow while receiving data.
 110 
 111                List of supported TX fields:
 112 
 113                    flow   The name of the flow that is currently active on
 114                           a link.
 115 
 116                    obytes The total number of bytes transmitted on a flow
 117                           or a link if a flow is not specified.
 118 
 119                    opkts  The total number of packets transmitted on a
 120                           flow or a link if a flow is not specified.
 121 
 122                    oerrs  The total number of errors seen on a link or
 123                           flow while transmitting data.
 124 
 125 
 126 
 127        flowstat -A [-l link] [flow]
 128            Display all statistics for a single flow, or all flows if none is
 129            specified.
 130 
 131 
 132            -A
 133                Display all statistical information for the flow specified or
 134                all flows.
 135 
 136 
 137 
 138        flowstat -S [-i interval] [-l link] [flow]
 139            Display a continuously updated real-time view of statistics from
 140            the link or flow.
 141 
 142            -S
 143                Display updated statistics in a dynamic real-time view of an
 144                active link or flow.
 145 
 146 
 147            -i interval
 148                Specify an interval in seconds to refresh statistics. The
 149                default interval is one second.
 150 
 151 
 152 
 153        flowstat -h [-a] [-d] [-F format] [-s <DD/MM/YYYY,HH:MM:SS>] [-e
 154        <DD/MM/YYYY,HH:MM:SS>] [-f logfile] [flow]
 155            Display historical statistical information for a single flow, or
 156            all flows if none is specified.
 157 
 158            -h
 159                Use historical information generated from extended accounting.
 160                This option must be used with the -f option to specify the
 161                logfile where the historical data is written to. See
 162                acctadm(1M) for information on enabling extended accounting.
 163 
 164 
 165            -a
 166                Displays all historical network usage. The only works once
 167                extended accounting is enabled. It includes usage information
 168                for the flows that have already been deleted.
 169 
 170 
 171            -d
 172                Display dates where logging information exists in the format
 173                MM/DD/YYYY.
 174 
 175 
 176            -F format
 177                Displays the network flow usage in a format specified. The only
 178                format currently supported is gnuplot.
 179 
 180 
 181            -s starttime
 182                Define the start-time for which to display flow data which is
 183                of the format YYYY.MM.DD,hh:mm:ss.  This option must be used
 184                with -e.
 185 
 186 
 187            -e endtime
 188                Define the end-time for which to display flow data which is of
 189                the format YYYY.MM.DD,hh:mm:ss.  This option must be used with
 190                -s.
 191 
 192 
 193            -f logfile
 194                The logfile contains flow data captured from enabling extended
 195                accounting using acctadm(1M).
 196 
 197 
 198 
 199 EXAMPLES
 200        Example 1 Display received packets on a particular flow
 201 
 202 
 203        The command below displays received packet data for the flow ssh-1 on
 204        the link e1000g0 over an interval of 2 seconds.
 205 
 206 
 207          # flowstat -r -i 2 -l e1000g0 ssh-1
 208                   FLOW    IPKTS   RBYTES    IERRS
 209                  ssh-1      382   32.10K        0
 210                  ssh-1        3      202        0
 211 
 212 
 213 
 214        Example 2 Display all statistics for a particular flow.
 215 
 216 
 217        The following command displays all statistics available for the flow
 218        ssh-1 on the link e1000g0.
 219 
 220 
 221          # flowstat -A -l e1000g0 ssh-1
 222          ssh-1
 223                       ipackets             766
 224                         rbytes           64474
 225                       opackets             464
 226                         obytes           56516
 227 
 228 
 229 
 230        Example 3 Display historical flow statistics.
 231 
 232 
 233        The following command displays flow statistics captured when using the
 234        extended accounting facility acctadm(1M).
 235 
 236 
 237          # flowstat -h -a -s 11/06/2015,16:02:51 -e 11/06/2015,16:04:31 \
 238          -f /var/adm/acct/flowlog.log
 239          FLOW         START         END           RBYTES   OBYTES   BANDWIDTH
 240          ssh-1        16:02:51      16:03:11      0        0            0 Mbps
 241          ssh-1        16:03:11      16:03:31      0        0            0 Mbps
 242          ssh-1        16:03:31      16:03:51      756      876          0 Mbps
 243          ssh-1        16:03:51      16:04:11      0        0            0 Mbps
 244          ssh-1        16:04:11      16:04:31      5564     3228     0.003 Mbps
 245 
 246 
 247 
 248 
 249 EXIT STATUS
 250        0
 251            All actions were performed successfully.
 252 
 253 
 254        >0
 255            An error occurred.
 256 
 257 
 258 STABILITY
 259        The invocation is committed. The output of the command is Not-an-
 260        Interface; however, the machine-parseable output of the command is
 261        committed.
 262 
 263 
 264 SEE ALSO
 265        acctadm(1M), dladm(1M), flowadm(1M), ifconfig(1M), prstat(1M),
 266        route(1M), attributes(5), dlpi(7P)
 267 
 268 
 269 
 270                                November 12, 2015                  FLOWSTAT(1M)