Visit The New, Modern Unix Linux Community


Thread Tools Search this Thread
Operating Systems Linux Red Hat netstat
# 1  


Can any body tell me about TIME_WAIT status meaning in the following command output.

[root@mbzsadm2 ~]# netstat -anp|grep 5000
tcp        0      0   *                   LISTEN      5058/ccsd
tcp        0      0     *                   LISTEN      5058/ccsd
tcp        0      0            ESTABLISHED 29100/java
tcp        0      0            ESTABLISHED 29100/java
tcp        0      0            ESTABLISHED 29100/java
tcp        0      0            TIME_WAIT   -
tcp        0      0            TIME_WAIT   -
tcp        0      0            TIME_WAIT   -
tcp        0      0            TIME_WAIT   -
udp        0      0     *                               5058/ccsd


Last edited by radoulov; 03-12-2013 at 07:17 AM..
# 2  
Hi Mastan,

tcp 0 0 TIME_WAIT -

This means the servers are waiting for the connection.You can also check

man netstat
 The socket is waiting after close to handle packets still in the network.

# 3  
As mentioned by others, having some connections in TIME_WAIT is a normal part of the socket close process. If you have a large number of TIME_WAIT connections you might want to decrease the wait interval.

You can see the current number of seconds by examining /proc/sys/net/ipv4/tcp_fin_timeout:
# cat /proc/sys/net/ipv4/tcp_fin_timeout

And modify the value:
# echo 45 > /proc/sys/net/ipv4/tcp_fin_timeout

# 4  
They are TCP-states only!!!

If an application using STREAM sockets; tcp protocol thread serve them and each such thread, at any point in time during the socket operations, has an state out of a total of 11 defined TCP states, based on the phase of the communication. This includes the beginning (right from the 1st SYN in the 3-way handshake) to the termination of the communication (when you close a socket).

The 'netstat' shows these states of all the TCP threads serving their corresponding sockets.

Please look at RFC#793.

Attaching the text showing TCP state change diagram.
The diagram depicts the states a TCP thread under goes (taken from RFC#793).

Last edited by Praveen_218; 03-12-2013 at 11:32 AM.. Reason: Pasting the diagram text directly didn't work well, hence uploaded the text file.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #116
Difficulty: Easy
Linux distributions are the most famous and healthiest example of the Unix derivatives; but macOS is currently the largest installed Unix user base (2019).
True or False?

10 More Discussions You Might Find Interesting

1. OS X (Apple)


When running netstat -i from the Command Terminal, It returns with 21 different connections.. The addresses all look like this: ::1 fe80:1::1 10:dd:b1:a5:c4:ba with Network names like Linke#2 fe80::8e2d How can I delve deeper into this to clarify what is going on with my network?... (0 Replies)
Discussion started by: dwfiedler
0 Replies

2. UNIX for Dummies Questions & Answers

Need help with a netstat command

Do I have this command correct to show all current connections/sessions my Solaris box has? It does not seem to do anything. netstat -an | grep EST (6 Replies)
Discussion started by: SIFT3R
6 Replies

3. UNIX for Advanced & Expert Users

Help with netstat

Hi, I want to list the time for how long a secure connections last to my server/blade. i am using netstat command to get the same, but not sure how to get the time for how long connections is being ESTABLISHED. netstat -na | grep 'ESTABLISHED' | grep :443 |awk '{print $4}' | cut -d: -f1 |... (1 Reply)
Discussion started by: Siddheshk
1 Replies

4. Shell Programming and Scripting

netstat command

Hi, In my project we use sftp with batch mode (password less) script in parallel for 14 sessions which connects to 2 different servers alternatively i.e. 7 connects to one server say server1 and the other 7 connects to say server 2. Now the problem is that these 14 sessions are run in... (5 Replies)
Discussion started by: dips_ag
5 Replies

5. Solaris

netstat -- what am i looking at?

Greetings to all, Here is a line of output from my netstat command cbp031.904 wdcprodhome.nfsd 98304 0 49640 0 ESTABLISHED The only thing i recognize is the unix machine "cbp031" but what is .904 and all the other data telling me? Thanks in advance. (3 Replies)
Discussion started by: Harleyrci
3 Replies

6. IP Networking

netstat output

I can't tell what the output of the netstat command means. Is there anywhere that has this information? I tried the man pages, but they weren't helpful. (3 Replies)
Discussion started by: Ultrix
3 Replies

7. BSD

question about netstat

For FreeBSD I use this command to determine what ports are listenning netstat -an | grep LISTEN is there another way, perhaps another command? (2 Replies)
Discussion started by: edgarvm
2 Replies

8. UNIX for Advanced & Expert Users

Netstat command

Hi.., Now, I am reading about the netstat command and its implementation. I have doubts in some options and its functionalities, natstat - M (Which is described as display masqueraded connections), what it means? What is Forwarding Information Base.?(--fib) Thanks in advance,... (3 Replies)
Discussion started by: nagalenoj
3 Replies

9. IP Networking


Hi what is the command to see the process name/application name along with the port number, connection status ... netstat is not giving process/application name Is there any way to know which application is holding which port? Thanks in advance (3 Replies)
Discussion started by: axes
3 Replies

10. IP Networking


Giving netstat command on the prompt gives commands such as localhost.43592 localhost.35237 32768 0 32768 0 TIME_WAIT localhost.43594 localhost.43595 32768 0 32768 0 TIME_WAIT localhost.43598 localhost.35237 32768 0 32768 0 TIME_WAIT... (6 Replies)
Discussion started by: DPAI
6 Replies

Featured Tech Videos