Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm developing a program in python that parses /proc/net/tcp informations, but unfortunately, while I was doing this, I saw a strange thing.

Practically, when a socket change in TIME_WAIT state, losses its inode number, and I don't know who is the owner of this socket.

I read some documents about this TIME_WAIT issue, and I understood that the connection is practically finished, and it remain in wait only to guarantee the data transfer.

Someone knows something about it?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

When the socket is in TIME_WAIT, there is no process attached to it anymore and the kernel is just holding it in case some other packet arrives. At this point, the software the originally opened this socket does not have a open file description to it anymore. That's why you can't find any relation to it. The socket that existed in /proc/$PID/fd is not there anymore.

share|improve this answer

A socket in TIME_WAIT status is no longer owned by a process, but by the kernel. As such, there is no owner, that's why you can't see it :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.