열의 가능한 값을 /proc/net/tcp
에 알고 싶습니다. 나는 st
열이 netstat(8)
또는 ss(8)
의 상태 열과 같다고 생각합니다.가능한 내부 소켓 상태 목록/proc
나는 3 개 코드를 식별하기 위해 관리해야 :
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode
0: 0100007F:08A0 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 7321 1 ffff81002f449980 3000 0 0 2 -1
1: 00000000:006F 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 6656 1 ffff81003a30c080 3000 0 0 2 -1
2: 00000000:0272 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 6733 1 ffff81003a30c6c0 3000 0 0 2 -1
3: 0100007F:0277 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 7411 1 ffff81002f448d00 3000 0 0 2 -1
4: 0100007F:0019 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 7520 1 ffff81002f4486c0 3000 0 0 2 -1
5: 0100007F:089F 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 7339 1 ffff81002f449340 3000 0 0 2 -1
6: 0100007F:E753 0100007F:0016 01 00000000:00000000 02:000AFA92 00000000 500 0 18198 2 ffff81002f448080 204 40 20 2 -1
7: 0100007F:E752 0100007F:0016 06 00000000:00000000 03:000005EC 00000000 0 0 0 2 ffff81000805dc00
위의 쇼 : 라인 SL 0
- : TCP/2208에서 수신 대기 포트를.
st = 0A = LISTEN
- 온라인 sl 6 : tcp/22에 설정된 세션.
st = 01 = ESTABLISHED
- 온라인 sl 7 : ssh 로그 아웃 후 TIME_WAIT 상태의 소켓. 아이 노드가 없습니다.
st = 06 = TIME_WAIT
누구든지이 목록을 확장 할 수 있습니까? proc(5)
맨 페이지라는 주제에 매우 간결하다 :
/proc/net/tcp
Holds a dump of the TCP socket table. Much of the information is not of use apart from debugging. The "sl" value is the kernel hash slot for the socket, the "local address" is the local address and
port number pair. The "remote address" is the remote address and port number pair (if connected). ’St’ is the internal status of the socket. The ’tx_queue’ and ’rx_queue’ are the outgoing and incom-
ing data queue in terms of kernel memory usage. The "tr", "tm->when", and "rexmits" fields hold internal information of the kernel socket state and are only useful for debugging. The "uid" field
holds the effective UID of the creator of the socket.
그리고 관련 메모에
은, 위의/proc 디렉토리/그물/TCP 출력이 몇 청취 과정 (2208, 62, 111 등)를 보이고있다. 그러나, tcp/22에서 listen TCP 연결을 볼 수는 없지만 established 및 time_wait 상태가 표시됩니다. 예,/proc/net/tcp6
에서 볼 수 있지만
/proc/net/tcp
에도 존재하지 않아야합니까? Netstat 출력은 ipv4에만 바인드 된 응용 프로그램과 다르게 표시됩니다. 예 :
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 4231/portmap
tcp 0 0 :::22 :::* LISTEN 4556/sshd
많은 감사, -Andrew
Heres 일부 [더 읽기] (http://www.readmespot.com/question/f/21657/semantics-of----and-0-0-0-0-in-dual-stack- oses) ipv4에서 ipv6 매핑에 관심이 있다면 –
그건 이제 죽은 링크입니다. 나는 아마 이것에 연결된다고 생각한다 : http://serverfault.com/questions/21657/semantics-of-and-0-0-0-0-in-dual-stack-oses – user314104