Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Confusion on output given by netstat

975148Sep 6 2014 — edited Sep 16 2014

I gave the following commands on my production server with the outputs as below:

1) netstat -tulpn | wc –l

151

2) netstat -tupn | wc –l

139

Now the output of the 1st command is higher than the 2nd command. My understanding is that the port should be first open and then listening which should mean that 2nd command should give a higher value than command 1. Are there 3 states of a port which are

1) Open

2) Listening

3) Closed?

So is the transition between the ports from open->listening->closed as a life cycle of transitions? means that the port is first open, then listening & finally closed. Or is it that the status of a port can be straight from listening to closed.

I hope my question is clear of not much clarity in the output of netstat command.

Requesting a reply to my post.

Regards

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2014
Added on Sep 6 2014
13 comments
3,896 views