TEST NAME

cl3se3 - TCP test

SYNOPSIS

sh se3 [ -c connections ] [ -p port ] servername

sh cl3 [ -c connections ] [ -p port ] servername

DESCRIPTION

cl3se3 is a test that transmits a complex pattern from a client to a server by using the TCP protocol. The server receives and verifies the data.

On the client side only, use the RUNTIME environment variable to specify, in seconds, the duration of the test.

OPTIONS

-c connections
Specify the number of connections to make or accept. The values may be different on the client and the server if, for example, you want 20 instances on one server, and 10 instances on each of two clients. Defaults to 1.

-p port
The TCP port to use for connections. Defaults to 4004.

OPERANDS

servername
Either a local host name or the IP address of a machine. On the client side, servername is the host to which to connect. On the server side, servername is the address to which to listen. If a host name is specified, that host name must appear in /etc/hosts along with the remote machine's IP address. The servername operand is optional for the server. It defaults to the value returned by gethostname(3C).

USAGE VARIABLES

RUNTIME
Specifies, in seconds, the duration of the test. This environment variable is required only on the client side.

SETUP

You need two machines connected by a network, either back-to-back, or through a hub or switch.

OUTPUT

The server initially produces a single line indicating the IP address and port to which it is bound and listening. As each incoming connection is received, the IP address that corresponds to the incoming connection is displayed.

After the expected number of incoming connections has been received, the output shows that it is waiting for the child processes (one per connection) to complete.

Similarly, the client indicates to which server it will attempt to connect and displays each process as it starts.

Finally, each child process completes and displays the number of blocks (each of size 65 Kbytes), and the exit status is reported (normally zero).

DURATION

8 hours

POSSIBLE CONCURRENT TESTS

This test can run concurrently with ftpstress, lsalr, mpflip, and scp.

NOTES

EXAMPLES

On the server side:

# ./se3 -c 2
Server jetman 129.156.228.84.4004 is bound
Starting server 0 - Accept 129.156.228.52
Starting server 1 - Accept 129.156.228.52
Waiting for child processes...
EOF 29 secs, 149 blocks
Process 15459 terminated, status 0
EOF 30 secs, 77 blocks
Process 15458 terminated, status 0
!PASS: No failures detected

On the client side:

# ./cl3 -c 2 jetman
(client) Server jetman 129.156.228.84.4004
Client 0 connected - starting to transmit
Waiting for child processes...
Client 1 connected - starting to transmit
client 1: No errors after 30 seconds - sent 149 blocks
Process 19631 terminated, status 0
client 0: No errors after 30 seconds - sent 77 blocks
Process 19630 terminated, status 0
!PASS: No failures detected

REFERENCES

read(2), write(2), hosts(4), tcp(7P)

Copyright 2005 Sun Microsystems, Inc. All rights reserved.