1syncloop(1M)            System Administration Commands            syncloop(1M)
2
3
4

NAME

6       syncloop - synchronous serial loopback test program
7

SYNOPSIS

9       /usr/sbin/syncloop [-cdlstv] device
10
11

DESCRIPTION

13       The syncloop command performs several loopback tests that are useful in
14       exercising the various components of a serial communications link.
15
16
17       Before running a test, syncloop opens the designated port  and  config‐
18       ures  it according to command line options and the specified test type.
19       It announces the names of the devices being used to control  the  hard‐
20       ware  channel,  the  channel  number  (ppa) corresponding to the device
21       argument, and the parameters  it has set for that channel. It then runs
22       the loopback test in three phases.
23
24
25       The  first  phase  is  to  listen  on the port for any activity.  If no
26       activity is seen for at least four seconds, syncloop  proceeds  to  the
27       next phase. Otherwise, the user is informed that the line is active and
28       that the test cannot proceed, and the program exits.
29
30
31       In the second phase, called the "first-packet" phase, syncloop attempts
32       to  send  and  receive one packet. The program will wait for up to four
33       seconds for the returned packet. If no  packets  are  seen  after  five
34       attempts,  the  test  fails with an excoriating message. If a packet is
35       returned, the result is compared with the original. If the  length  and
36       content do not match exactly, the test fails.
37
38
39       The final phase, known as the "multiple-packet" phase, attempts to send
40       many packets through the loop. Because the  program  has  verified  the
41       integrity of the link in the first-packet phase, the test will not fail
42       after a particular number of timeouts. If a packet is  not  seen  after
43       four  seconds, a message is displayed. Otherwise, a count of the number
44       of packets received is updated on the display once per  second.  If  it
45       becomes  obvious  that  the  test  is not receiving packets during this
46       phase, the user may wish to stop the program manually. The  number  and
47       size  of  the  packets  sent during this phase is determined by default
48       values, or by command line options. Each returned  packet  is  compared
49       with  its  original  for length and content. If a mismatch is detected,
50       the test fails.  The test completes when the required number of packets
51       have been sent, regardless of errors.
52
53
54       After  the  multiple-packet phase has completed, the program displays a
55       summary of the hardware event  statistics  for  the  channel  that  was
56       tested. The display takes the following form:
57
58         CRC errors   Aborts   Overruns   Underruns   In<-Drops-> Out
59                 0         0          0           0   0             0
60
61
62
63
64       This  is followed by an estimated line speed, which is an approximation
65       of the bit rate of the line, based on the number of bytes sent and  the
66       actual time that it took to send them.
67

OPTIONS

69       The options for syncloop are described in the following table:
70
71
72
73
74       Option      Parameter     Default             Description
75       -c        packet_count    100        Specifies the number of pack‐
76                                            ets to be sent in the  multi‐
77                                            ple-packet phase.
78       -d        hex_data_byte   random     Specifies  that  each  packet
79                                            will  be  filled  with  bytes
80                                            with     the     value     of
81                                            hex_data_byte.
82       -l        packet_length   100        Specifies the length of  each
83                                            packet in bytes.
84       -s        line_speed      9600       Bit rate in bits per second.
85       -v                                   Sets  verbose  mode.  If data
86                                            errors  occur,  the  expected
87                                            and  received  data  is  dis‐
88                                            played.
89       -t        test_type       none       A number, from 1 to  4,  that
90                                            specifies  which test to per‐
91                                            form.    The    values    for
92                                            test_type  are as follows: 1:
93                                            Internal loopback test.  Port
94                                            loopback is on.  Transmit and
95                                            receive  clock  sources   are
96                                            internal  (baud  rate genera‐
97                                            tor).  2:  External  loopback
98                                            test.   Port loopback is off.
99                                            Transmit  and  receive  clock
100                                            sources     are     internal.
101                                            Requires  a   loopback   plug
102                                            suitable  to  the  port under
103                                            test.  3:  External  loopback
104                                            test.   Port loopback is off.
105                                            Transmit  and  receive  clock
106                                            sources are external (modem).
107                                            Requires  that  one  of   the
108                                            local   modem,   the   remote
109                                            modem, or the  remote  system
110                                            be set in a loopback configu‐
111                                            ration. 4: Test using  prede‐
112                                            fined    parameters.     User
113                                            defines  hardware  configura‐
114                                            tion   and  may  select  port
115                                            parameters     using      the
116                                            syncinit(1M) command.
117
118
119
120       All numeric options except -d are entered as decimal numbers (for exam‐
121       ple, -s 19200). If you do not provide the -t test_type option, syncloop
122       prompts for it.
123

EXAMPLES

125       Example 1 A sample display of using the syncloop command.
126
127
128       In  the  following  command  syncloop uses a packet length of 512 bytes
129       over the first CPU port:
130
131
132         example# syncloop -l 512 zsh0
133
134
135
136
137       In response to the above command, syncloop prompts  you  for  the  test
138       option you want.
139
140
141
142       The  following  command performs an internal loopback test on the first
143       CPU port, using 5000 packets and a bit rate of 56Kbps:
144
145
146         example# syncloop -t 1 -s 56000 -c 5000 zsh0
147
148
149

ATTRIBUTES

151       See attributes(5) for descriptions of the following attributes:
152
153
154
155
156       ┌─────────────────────────────┬─────────────────────────────┐
157       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
158       ├─────────────────────────────┼─────────────────────────────┤
159       │Availability                 │SUNWcsu                      │
160       └─────────────────────────────┴─────────────────────────────┘
161

SEE ALSO

163       syncinit(1M), syncstat(1M), attributes(5), zsh(7D)
164

DIAGNOSTICS

166       device missing minor device number
167
168           The name device does not end in a decimal number that can  be  used
169           as a minor device number.
170
171
172       invalid packet length: nnn
173
174           The  packet  length  was  specified to be less than zero or greater
175           than 4096.
176
177
178       poll: nothing to read
179
180
181
182
183       poll: nothing to read or write.
184
185           The poll(2) system call indicates that there is  no  input  pending
186           and/or that output would be blocked if attempted.
187
188
189       len xxx should be yyy
190
191           The packet that was sent had a length of yyy, but was received with
192           a length of xxx.
193
194
195       nnn packets lost in outbound queueing
196
197
198
199
200       nnn packets lost in inbound queueing
201
202           A discrepancy has been found between the number of packets sent  by
203           syncloop  and the number of packets the driver counted as transmit‐
204           ted, or between the number counted as received and the number  read
205           by the program.
206
207

WARNINGS

209       To  allow  its tests to run properly, as well as prevent disturbance of
210       normal operations, syncloop should only be run on a port  that  is  not
211       being used for any other purpose at that time.
212
213
214
215SunOS 5.11                        9 Mar 1993                      syncloop(1M)
Impressum