Move /var/svc/log to /var/log/svc
[unleashed/lotheac.git] / share / man / man8 / syncloop.8
blob35bde5ee08e63170408878f4e10ea07c9fbe2814
1 '\" te
2 .\" Copyright (c) 1993, Sun Microsystems, Inc.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH SYNCLOOP 8 "Mar 9, 1993"
7 .SH NAME
8 syncloop \- synchronous serial loopback test program
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/syncloop\fR [\fB-cdlstv\fR] \fIdevice\fR
13 .fi
15 .SH DESCRIPTION
16 .sp
17 .LP
18 The \fBsyncloop\fR command performs several loopback tests that are useful in
19 exercising the various components of a serial communications link.
20 .sp
21 .LP
22 Before running a test, \fBsyncloop\fR opens the designated port and configures
23 it according to command line options and the specified test type. It announces
24 the names of the devices being used to control the hardware channel, the
25 channel number (ppa) corresponding to the \fIdevice\fR argument, and the
26 parameters  it has set for that channel. It then runs the loopback test in
27 three phases.
28 .sp
29 .LP
30 The first phase is to listen on the port for any activity.  If no activity is
31 seen for at least four seconds, \fBsyncloop\fR proceeds to the next phase.
32 Otherwise, the user is informed that the line is active and that the test
33 cannot proceed, and the program exits.
34 .sp
35 .LP
36 In the second phase, called the "first-packet" phase, \fBsyncloop\fR attempts
37 to send and receive one packet. The program will wait for up to four seconds
38 for the returned packet. If no packets are seen after five attempts, the test
39 fails with an excoriating message. If a packet is returned, the result is
40 compared with the original. If the length and content do not match exactly, the
41 test fails.
42 .sp
43 .LP
44 The final phase, known as the "multiple-packet" phase, attempts to send many
45 packets through the loop. Because the program has verified the integrity of the
46 link in the first-packet phase, the test will not fail after a particular
47 number of timeouts. If a packet is not seen after four seconds, a message is
48 displayed. Otherwise, a count of the number of packets received is updated on
49 the display once per second. If it becomes obvious that the test is not
50 receiving packets during this phase, the user may wish to stop the program
51 manually. The number and size of the packets sent during this phase is
52 determined by default values, or by command line options. Each returned packet
53 is compared with its original for length and content. If a mismatch is
54 detected, the test fails.  The test completes when the required number of
55 packets have been sent, regardless of errors.
56 .sp
57 .LP
58 After the multiple-packet phase has completed, the program displays a summary
59 of the hardware event statistics for the channel that was tested. The display
60 takes the following form:
61 .sp
62 .in +2
63 .nf
64 CRC errors   Aborts   Overruns   Underruns   In<-Drops-> Out
65         0         0          0           0   0             0
66 .fi
67 .in -2
68 .sp
70 .sp
71 .LP
72 This is followed by an estimated line speed, which is an approximation of the
73 bit rate of the line, based on the number of bytes sent and the actual time
74 that it took to send them.
75 .SH OPTIONS
76 .sp
77 .LP
78 The options for \fBsyncloop\fR are described in the following table:
79 .sp
81 .sp
82 .TS
83 c c c c
84 l l l l .
85 \fBOption\fR    \fBParameter\fR \fBDefault\fR   \fBDescription\fR
86 \fB-c\fR        \fIpacket_count\fR      100     T{
87 Specifies the number of packets to be sent in the multiple-packet phase.
89 \fB-d\fR        \fIhex_data_byte\fR     \fIrandom\fR    T{
90 Specifies that each packet will be filled with bytes with the value of \fIhex_data_byte\fR.
92 \fB-l\fR        \fIpacket_length\fR     100     T{
93 Specifies the length of each packet in bytes.
95 \fB-s\fR        \fIline_speed\fR        9600    Bit rate in bits per second.
96 \fB-v\fR                        T{
97 Sets verbose mode.  If data errors occur, the expected and received data is displayed.
99 \fB-t\fR        \fItest_type\fR \fInone\fR      T{
100 A number, from 1 to 4, that specifies which test to perform.  The values for \fItest_type\fR are as follows: \fB1\fR: Internal loopback test.  Port loopback is on.  Transmit and receive clock sources are internal (baud rate generator). \fB2\fR: External loopback test.  Port loopback is off.  Transmit and receive clock sources are internal.  Requires a loopback plug suitable to the port under test. \fB3\fR: External loopback test.  Port loopback is off.  Transmit and receive clock sources are external (modem).  Requires that one of the local modem, the remote modem, or the remote system be set in a loopback configuration. \fB4\fR: Test using predefined parameters.  User defines hardware configuration and may select port parameters using the \fBsyncinit\fR(8) command.
106 All numeric options except \fB-d\fR are entered as decimal numbers (for
107 example, \fB\fR\fB-s\fR\fB 19200\fR). If you do not provide the \fB-t\fR\fI
108 test_type\fR option, \fBsyncloop\fR prompts for it.
109 .SH EXAMPLES
111 \fBExample 1 \fRA sample display of using the \fBsyncloop\fR command.
114 In the following command \fBsyncloop\fR uses a packet length of 512 bytes over
115 the first CPU port:
118 .in +2
120 \fBexample# syncloop \fR\fB-l\fR\fB 512 zsh0\fR
122 .in -2
127 In response to the above command, \fBsyncloop\fR prompts you for the test
128 option you want.
132 The following command performs an internal loopback test on the first CPU port,
133 using 5000 packets and a bit rate of 56Kbps:
136 .in +2
138 \fBexample# syncloop \fR\fB-t\fR\fB 1 \fR\fB-s\fR\fB 56000 \fR\fB-c\fR\fB 5000 zsh0\fR
140 .in -2
143 .SH SEE ALSO
146 \fBsyncinit\fR(8), \fBsyncstat\fR(8), \fBattributes\fR(5), \fBzsh\fR(7D)
147 .SH DIAGNOSTICS
149 .ne 2
151 \fB\fIdevice\fR\fB missing minor device number\fR\fR
153 .sp .6
154 .RS 4n
155 The name \fIdevice\fR does not end in a decimal number that can be used as a
156 minor device number.
160 .ne 2
162 \fB\fBinvalid packet length: \fR\fInnn\fR\fR
164 .sp .6
165 .RS 4n
166 The packet length was specified to be less than zero or greater than 4096.
170 .ne 2
172 \fB\fBpoll: nothing to read\fR\fR
174 .sp .6
175 .RS 4n
180 .ne 2
182 \fB\fBpoll: nothing to read or write.\fR\fR
184 .sp .6
185 .RS 4n
186 The \fBpoll\fR(2) system call indicates that there is no input pending and/or
187 that output would be blocked if attempted.
191 .ne 2
193 \fB\fBlen \fR\fIxxx\fR\fB should be \fR\fIyyy\fR\fR
195 .sp .6
196 .RS 4n
197 The packet that was sent had a length of \fIyyy\fR, but was received with a
198 length of \fIxxx\fR.
202 .ne 2
204 \fB\fInnn\fR\fB packets lost in outbound queueing\fR\fR
206 .sp .6
207 .RS 4n
212 .ne 2
214 \fB\fInnn\fR\fB packets lost in inbound queueing\fR\fR
216 .sp .6
217 .RS 4n
218 A discrepancy has been found between the number of packets sent by
219 \fBsyncloop\fR and the number of packets the driver counted as transmitted, or
220 between the number counted as received and the number read by the program.
223 .SH WARNINGS
226 To allow its tests to run properly, as well as prevent disturbance of normal
227 operations, \fBsyncloop\fR should only be run on a port that is not being used
228 for any other purpose at that time.