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:
-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 -aThis 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 -jThis might display the following output:
124b0c, 12500c
trpt -p 12500cThis 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 Version 4.3 System Management Guide: Communications and Networks.