Tip of the Week: Determining Port Usage

Blog Post created by guy_wettstein on Feb 17, 2013

Setting up license servers, RSCM servers, DMS servers, etc..., they all require you to select an available port. Guessing just leads to frustration but fortunately, determining which ports are available is fairly simple. The netstat command works on both Windows and Linux and will show you which ports are in use and the processes that are using them. For example:


On Windows:


C:\>netstat -anu|more

Active Connections




  Proto  Local Address          Foreign Address        State           PID


  TCP                LISTENING       2856


  TCP                LISTENING       856


  TCP                LISTENING       4


  TCP                LISTENING       2968


  TCP                LISTENING       2968


  TCP               LISTENING       17196


-- More  --



More specifically, you can check if a particular port is in use:


C:\>netstat -ano | find /i "1718"




TCP               LISTENING       2528



On Linux:


$ netstat -tulpn | grep 1717

tcp        0      0      *                   LISTEN      21066/lmgrd       



Note: You'll need to be root to run netstat effectively.



Once you have this port usage information, you can make decisions about which ports you want your server processes to use.


Feel free to share your tips and ideas on this topic in the comments.