The bastat utility displays statistics about how network traffic is being classified and scheduled. It has the following syntax:
/opt/SUNWconn/sbin/bastat [-b] [-I iflist] [-i time] [-n number] [-t] [-o output] [-c|-s|-r] [classnames] |
-b instructs bastat to display statistics in bits instead of in bytes. By default, bastat displays the statistics in bytes.
iflist is a comma-separated list of names of the interfaces to be polled. If you do not specify the -I option, all interfaces are polled. Specify the interface name in the format name_suffix, where suffix is one of in or out, depending on the direction of traffic handled by the interface. If you do no specify a direction, out is assumed.
time is the time in seconds between polls. By default, the poll interval is one second. The time between polls cannot be less than 0.05 seconds.
number is the number of polls required. If you specify the -n option, bastat polls this number of times and then exits. By default, polling continues until you stop bastat.
-t instructs bastat to display the current totals for each variable, instead of the differences since the last poll interval. By default, bastat displays the differences.
output is a comma-separated list of the statistics to be displayed. The following statistics are available:
npkts is the number of packets sent
nbytes is the number of bytes sent
borrows is the number of packets sent using bandwidth borrowed from the parent class
drops is the number of packets dropped
bdrops is the number of bytes dropped
rate is the average throughput in bytes per second
parent display the name of the parent class
all displays all the available statistics
By default, the number of bytes sent and the throughput rate are displayed.
-c, -s, or -r indicates the bastat mode:
-c poll the children of the given classes.
-s poll the subtree of the given classes.
-r reset the statistics of the given classes. You must be root or superuser to reset the statistics.
By default only the specified classes are polled.
classnames is a comma-separated list of the names of the classes to be polled. By default, the root class is polled.
If you do not specify any switches on the command line, bastat displays statistics for the root class for each interface, showing the number of bytes sent and the throughput rate. The poll interval is one second and polling continues until you stop bastat.
To display all the statistics for all classes on the interface le0, type:
$ bastat -I le0 -s
To display all the statistics for all classes on all interfaces, type:
$ bastat -s