...> asystat
Display statistics on asynchronous communications interfaces, if any have been created by the attach command. The display for each open port consists of three lines.
- The first line gives the port label and the configuration flags.
- The second line of the status display shows recieved traffic statistics.
- The third line of the status display shows transmitted traffic statistics.
The parameters shown in lines 2 and 3 are:
ints is the number of times pwait() returned control to the rx or tx task, indicating that select() detected pending data on input or a packet became available for output.
chars is the number of characters read/written.
puts number of times received data was placed in the packet Hopper.
gets number of times data was taken out of the send queue and written to the device.
rxqueue is described in the asyconfig command helpfile.
txqueue is described in the asyconfig command helpfile.
qlen is the instantaneous queue size (number of packets).
ovq is the number of times queue flow control (described in asyconfig) was triggered.
block is the number of times read/write tried to block (in the case of reads, the number of times it tried to block after data was claimed to be available).
buf is the current receive buffer size, as specified in the attach statement or the asyconfig command.
Example output for two devices from a UNIX platform:
144.99: cua0, 9600 bps, packet size 255, RTS/CTS disabled, carrier disabled RX: ints 2 chars 73 puts 2 rxqueue 5 qlen 0 ovq 0 block 0 buf 1024 TX: ints 1 chars 57 gets 0 txqueue 2 qlen 0 ovq 0 block 0 linux: ttype, 38400 bps, non-blocking, RTS/CTS disabled, carrier disabled RX: ints 0 chars 0 puts 0 rxqueue 2 qlen 0 ovq 0 block 0 buf 1024 TX: ints 0 chars 0 gets 0 txqueue 2 qlen 0 ovq 0 block 0
Example output from a DOS platform is more indicative of hardware than of operating system services:
tnc: [NS16550A] [trigger 0xc0] [rlsd line control] 19200 bps [@ 3f8,4] RX: 929462 int, 3683653 chr, 0 hw over, 6 hw hi, 17210 fifo TO, 0 sw over, 126 sw hi TX: 946381 int, 7400204 chr, 0 q, 79401 MS int, 40 THRE TO tnc2: [NS16550A] [trigger 0xc0] 9600 bps [@ 2f8,3] RX: 722895 int, 2865467 chr, 0 hw over, 8 hw hi, 13075 fifo TO, 0 sw over, 248 sw hi TX: 246420 int, 1889156 chr, 0 q, 1 MS int, 16 THRE TO
Line #1 indicates whether the port is a (8250 or 16550A) chip, the trigger character if any, whether CTS flow control is enabled, whether RLSD (carrier detect) line control is enabled, the speed in bits per second, and the port address and IRQ number in hexadecimal. (Receiving the trigger character causes the driver to signal upper layer software that data is ready; it is automatically set to the appropriate frame end character for SLIP, PPP and NRS lines.)
Line #2 shows: the total number of receive interrupts, received characters, receiver overruns (lost characters) and the receiver high water mark. The high water mark is the maximum number of characters ever read from the device during a single interrupt. This is useful for monitoring system interrupt latency margins as it shows how close the port hardware has come to overflowing due to the inability of the CPU to respond to a receiver interrupt in time. 8250 chips have no FIFO, so the high water mark cannot go higher than 2 before overruns occur. The 16550A chip, however, has a 16-byte receive FIFO which the software programs to interrupt the CPU when the FIFO is one-quarter full. The high water mark should typically be 4 or 5 when a 16550A is used; higher values indicate that the CPU has at least once been slow to respond to a receiver interrupt.
- When the 16550A is used, a count of FIFO timeouts is also displayed on the RX status line. These are generated automatically by the 16550A when three character intervals go by with more than 0 but less than 4 characters in the FIFO. Since the characters that make up a SLIP or NRS frame are normally sent at full line speed, this count will usually be a lower bound on the number of frames received on the port, as only the last fragment of a frame generally results in a timeout (and then only when the frame is not a multiple of 4 bytes long.)
Finally, the software fifo overruns and high water mark are displayed. These indicate whether the <bufsize> parameter on the attach command needs to be adjusted (see the Attach Commands chapter).
Line #3 shows statistics, including a total count of transmit interrupts, transmitted characters, the length of the transmit queue in bytes, the number of status interrupts, and the number of THRE timeouts. The status interrupt count will be zero unless CTS flow control or RLSD line control has been enabled. The THRE timeout is a stopgap measure to catch lost transmit interrupts, which seem to happen when there is a lot of activity (ideally, this will be zero).
