proc_net_tcp.txt 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. This document describes the interfaces /proc/net/tcp and /proc/net/tcp6.
  2. These /proc interfaces provide information about currently active TCP
  3. connections, and are implemented by tcp_get_info() in net/ipv4/tcp_ipv4.c and
  4. tcp6_get_info() in net/ipv6/tcp_ipv6.c, respectively.
  5. It will first list all listening TCP sockets, and next list all established
  6. TCP connections. A typical entry of /proc/net/tcp would look like this (split
  7. up into 3 parts because of the length of the line):
  8. 46: 010310AC:9C4C 030310AC:1770 01
  9. | | | | | |--> connection state
  10. | | | | |------> remote TCP port number
  11. | | | |-------------> remote IPv4 address
  12. | | |--------------------> local TCP port number
  13. | |---------------------------> local IPv4 address
  14. |----------------------------------> number of entry
  15. 00000150:00000000 01:00000019 00000000
  16. | | | | |--> number of unrecovered RTO timeouts
  17. | | | |----------> number of jiffies until timer expires
  18. | | |----------------> timer_active (see below)
  19. | |----------------------> receive-queue
  20. |-------------------------------> transmit-queue
  21. 1000 0 54165785 4 cd1e6040 25 4 27 3 -1
  22. | | | | | | | | | |--> slow start size threshold,
  23. | | | | | | | | | or -1 if the threshold
  24. | | | | | | | | | is >= 0xFFFF
  25. | | | | | | | | |----> sending congestion window
  26. | | | | | | | |-------> (ack.quick<<1)|ack.pingpong
  27. | | | | | | |---------> Predicted tick of soft clock
  28. | | | | | | (delayed ACK control data)
  29. | | | | | |------------> retransmit timeout
  30. | | | | |------------------> location of socket in memory
  31. | | | |-----------------------> socket reference count
  32. | | |-----------------------------> inode
  33. | |----------------------------------> unanswered 0-window probes
  34. |---------------------------------------------> uid
  35. timer_active:
  36. 0 no timer is pending
  37. 1 retransmit-timer is pending
  38. 2 another timer (e.g. delayed ack or keepalive) is pending
  39. 3 this is a socket in TIME_WAIT state. Not all fields will contain
  40. data (or even exist)
  41. 4 zero window probe timer is pending