Performs protocol tracing on TCP sockets.
trpt [ -a ] [ -f ] [ -j ] [ -pAddress ]... [ -s ] [ -t ]
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:
$ 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 $ _
The netstat command, tracesoff command, traceson command.
The setsockopt subroutine.
TCP/IP Overview, TCP/IP Protocols, TCP/IP Routing in AIX 5L Version 5.1 System Management Guide: Communications and Networks.