Performs protocol tracing on TCP sockets.
The trpt command queries the buffer for Transmission Control Protocol (TCP) trace records. This buffer is created when a socket is marked for debugging with the setsockopt subroutine. The trpt command then prints a description of these trace records.
Note: You can use the traceson command to turn on socket level debugging for daemons.
When you specify no options, the trpt command prints all the trace records found in the system and groups them according to their TCP/IP connection protocol control block (PCB).
Before you can use the trpt command, you must:
The -f flag can be used to follow the trace log once it is located. The -j flag can be used to check the presence of trace records for the socket in question.
If the system image does not contain the proper symbols to find the trace buffer, the trpt command cannot succeed.
The information put out by the trpt command varies with the flag you use. Definitions of the fields contained in the various types of output follow:
Item | Description |
---|---|
Protocol Control Block identifier | Identifies the protocol block to be traced, as shown in the
following example:
|
Timestamp | Specifies the time at which the connection is attempted,
as shown in the following example:
|
Connection State | Specifies the state of the connection with the protocol control
block:
|
Action | Specifies the current status of the packet trace connection.
The output of the command changes depending on the action.
as in the following example:
as in the following example:
|
|
|
Drop | Specifies that data was in preceding segment; data is dropped. |
Window and Sequence Variables | Types of window and sequence variables follow:
|
Item | Description |
---|---|
-a | Prints the values of the source and destination addresses for each packet recorded, in addition to the normal output. |
-f | Follows the trace as it occurs, waiting briefly for additional records each time the end of the log is reached. |
-j | Lists just the protocol control block addresses for which trace records exist. |
-pAddress | Shows only trace records associated with the protocol control block specified in hexadecimal by the Address variable. You must repeat the -p flag with each Address variable specified. |
-s | Prints a detailed description of the packet-sequencing information, in addition to the normal output. |
-t | Prints the values for all timers at each point in the trace, in addition to the normal output. |
$ trpt -a
This
might display the following output: 124b0c:
900 ESTABLISHED:input (src=192.9.201.3,4257, dst=192.9.201.2,102
5)2326e6e5@ad938c02(win=200)<ACK,FIN,PUSH> -> CLOSE_WAIT
900 CLOSE_WAIT:output (src=192.9.201.2,1025, dst=192.9.201.3,425
7)ad938c02@2326e6e6(win=4000)<ACK> -> CLOSE_WAIT
900 LAST_ACK:output (src=192.9.201.2,1025, dst=192.9.201.3,4257)
ad938c02@2326e6e6(win=4000)<ACK,FIN> -> LAST_ACK
900 CLOSE_WAIT:user DISCONNECT -> LAST_ACK
900 LAST_ACK:user DETACH -> LAST_ACK 12500c:
800 ESTABLISHED:output (src=192.9.201.2,1024, dst=192.9.201.3,51
2)ad8eaa13@2326e6e5(win=4000)<ACK> -> ESTABLISHED
800 ESTABLISHED:input (src=192.9.201.3,512, \
dst=192.9.201.2,1024)
[2326e6e5..2326e727)@ad8eaa13(win=1ef)<ACK,PUSH> -> ESTABLISHED
800 ESTABLISHED:user RCVD -> ESTABLISHED
900 ESTABLISHED:output (src=192.9.201.2,1024, dst=192.9.201.3,51
2)ad8eaa13@2326e727(win=4000)<ACK> -> ESTABLISHED
900 ESTABLISHED:input (src=192.9.201.3,512, \
dst=192.9.201.2,1024)
[2326e727..2326e82f)@ad8eaa13(win=1ef)<ACK,PUSH> -> ESTABLISHED
900 ESTABLISHED:user RCVD -> ESTABLISHED
900 ESTABLISHED:output (src=192.9.201.2,1024, dst=192.9.201.3,51
2)ad8eaa13@2326e82f(win=4000)<ACK> -> ESTABLISHED
900 ESTABLISHED:input (src=192.9.201.3,512, \
dst=192.9.201.2,1024)
2326e82f@ad8eaa13(win=1ef)<ACK,FIN,PUSH> -> CLOSE_WAIT
900 CLOSE_WAIT:output (src=192.9.201.2,1024, \
dst=192.9.201.3,512)
ad8eaa13@2326e830(win=4000)<ACK> -> CLOSE_WAIT
900 LAST_ACK:output (src=192.9.201.2,1024, dst=192.9.201.3,512)a
d8eaa13@2326e830(win=4000)<ACK,FIN> -> LAST_ACK
900 CLOSE_WAIT:user DISCONNECT -> LAST_ACK
900 LAST_ACK:user DETACH -> LAST_ACK
$ _
trpt -j
This might display the following
output: 124b0c, 12500c
trpt -p 12500c
This might display the
following output: 800 ESTABLISHED:output ad8eaa13@2326e6e5(win=4000)<ACK> ->
ESTABLISHED
800 ESTABLISHED:input [2326e6e5..2326e727)@ad8eaa13(win=1ef)
<ACK,PUSH> -> ESTABLISHED
800 ESTABLISHED:user RCVD -> ESTABLISHED
900 ESTABLISHED:output ad8eaa13@2326e727(win=4000)<ACK> -> ESTABLISHED
900 ESTABLISHED:input [2326e727..2326e82f)@ad8eaa13(win=1ef) <ACK,PUSH> -> ESTABLISHED
900 ESTABLISHED:user RCVD -> ESTABLISHED
900 ESTABLISHED:output ad8eaa13@2326e82f(win=4000)<ACK> -> ESTABLISHED
900 ESTABLISHED:input 2326e82f@ad8eaa13(win=1ef)<ACK,FIN,PUSH> -> CLOSE_WAIT
900 CLOSE_WAIT:output ad8eaa13@2326e830(win=4000)<ACK> -> CLOSE_WAIT
900 LAST_ACK:output ad8eaa13@2326e830(win=4000)<ACK,FIN> -> LAST_ACK
900 CLOSE_WAIT:user DISCONNECT -> LAST_ACK
900 LAST_ACK:user DETACH -> LAST_ACK
$ _