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