proc_net_tcp.txt 2.5 KB

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