Pages

Find if a port is occupied in a server | windows

I have a problem in a server. I have to run a tomcat instant and I was not sure on which port should I configure it to listen, since most of the applications use 8080 as their default port. Now I researched on it and found it quiet easy.
The following command will give you whether the particular port is pre-occupied in that machine or not.
netstat -a -n -0 | find "8080"
Now the theoretical details.
Netstat is a command for gathering network statistics. It displays very detailed information about communication of your computer with other devices in the network.

-a is the switch for displaying active TCP connections as well as UDP connections.
-o is used for preventing the command to display host names etc.

For more details take reference of the following site.

No comments:

Post a Comment

If you like to say anything (good/bad), Please do not hesitate...