Copyright (c) 1993, Sun Microsystems, Inc.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
/usr/sbin/syncstat [-c] device [interval]
Event statistics are maintained by a driver for each physical channel that it supports. They are initialized to zero at the time the driver module is loaded into the system, which may be either at boot time or when one of the driver's entry points is first called.
The device argument is the name of the serial device as it appears in the /dev directory. For example, zsh0 specifies the first on-board serial device.
The following is a breakdown of syncstat output:
speed |
The line speed the device has been set to operate at. It is the user's responsibility to make this value correspond to the modem clocking speed when clocking is provided by the modem. |
ipkts The total number of input packets. |
opkts The total number of output packets. |
undrun |
The number of transmitter underrun errors. |
ovrrun The number of receiver overrun errors. |
abort The number of aborted received frames. |
crc |
The number of received frames with CRC errors. |
isize |
The average size (in bytes) of input packets. |
osize |
The average size (in bytes) of output packets. |
Clear the accumulated statistics for the device specified. This may be useful when it is not desirable to unload a particular driver, or when the driver is not capable of being unloaded.
syncstat samples the statistics every interval seconds and reports incremental changes. The output reports line utilization for input and output in place of average packet sizes. These are the relationships between bytes transferred and the baud rate, expressed as percentages. The loop repeats indefinitely, with a column heading printed every twenty lines for convenience.
example# syncstat zsh0
speed ipkts opkts undrun ovrrun abort crc isize osize
9600 15716 17121 0 0 1 3 98 89
example# syncstat -c zsh0 speed ipkts opkts undrun ovrrun abort crc isize osize 9600 0 0 0 0 0 0 0 0
In the following sample output a new line of output is generated every five seconds:
example# syncstat zsh0 5
ipkts opkts undrun ovrrun abort crc iutil outil
12 10 0 0 0 0 5% 4%
22 60 0 0 0 0 3% 90%
36 14 0 0 0 1 51% 2%
The argument arg is expected to be an interval and could not be understood.
The name device does not end in a decimal number that can be used as a minor device number.
The interval option is being used and the baud rate on the device is zero. This would cause a divide-by-zero error when computing the line utilization statistics.
The percentages for input and output line utilization reported when using the interval option may occasionally be reported as slightly greater than 100% because of inexact sampling times and differences in the accuracy between the system clock and the modem clock. If the percentage of use greatly exceeds 100%, or never exceeds 50%, then the baud rate set for the device probably does not reflect the speed of the modem.