How to Determine Which Ports Are Being Used by Which Processes?

Publication Date:  2012-07-23 Views:  116 Downloads:  0
Issue Description

During the VSM installation or usage, messages are displayed indicating that the ports are occupied. How to determine which ports are used by which processes?

Alarm Information
None
Handling Process

Step 1      Log in to the VSM server.

Enter the path to the extracted convert  file:  /FS:NTFS. If the installation package is extracted at disk F, enter convert F: /FS:NTFS. Enter information as prompted. Restart the computer.

Step 2     Choose Start > Run, and the Run window is displayed.

Step 3     Enter cmd and click OK.

Step 4     Enter netstat -ano > "d:\port.log".

The port usage information is displayed. Save the information in the automatically created port.log file in the root directory of disk D. 

Step 5     Open the port.log file to check the port usage.

Active Connections
 
  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:21             0.0.0.0:0              LISTENING       1808
  TCP    0.0.0.0:1034           0.0.0.0:0              LISTENING       456
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       788
  UDP    0.0.0.0:514            *:*                                    3824
  TCP    0.0.0.0:8250           0.0.0.0:0              LISTENING       3992

Step 6     Search for the number of the occupied port indicated in the message and find out the PID of the port.

For example, the PID of port 514 is 3824.

Step 7     Click Start > Windows Security. In the Windows Security dialog box that is displayed,click Start Task Manager.

Step 8     Click the Process tab and choose View > Select Columns.

Step 9     In the dialog box that is displayed, select the PID (Process Identifier), and click OK.

Step 10     In Process List, locate the process that occupies the port according to the PID.

For example, the Image Name of PID3824 is DmsSyslogCollector.exe, which means port 514 is occupied by process DmsSyslogCollector.exe.

Root Cause
None
Suggestions
None

END