Welcome to the SRT HelpDesk, it is 21 Nov 2009
Support Center
»
Knowledgebase
»
How to determine which program is using a given port
How to determine which program is using a given port
Solution
Go to a command prompt and run:
netstat -a -n -p tcp -b
This will show all services running, protocal used, local and foreign address, state and PID (process identifier).
=============================================================================================
You can also use the following process outlined by Microsoft KB Article# 281336: (http://support.microsoft.com/default.aspx/kb/281336)
To determine which IP/Port is being used by a given program, use the following command:
NETSTAT -p tcp -ano
The Netstat.exe utility has a new switch, the -o switch, that can display the process identifier (ID) that is associated with each connection. This information can be used to determine which process (program) listens on a given port. For example, the netstat -ano command can produce the following output:
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:80 0.0.0.0:0 Listening 888
If you use Task Manager, you can match the process ID that is listed to a process name (program). This feature enables you to find the specific port that a program currently uses. Because this specific port is in use already by a program, another program is prevented from using that same port.
1) Launch Task Manager, click 'Start', then 'Run', and enter TASKMGR.EXE.
2) Go to the PROCESSES tab. If you do not see a PID column, click VIEW, SELECT COLUMNS, and then click to select the PID check box.
3) Click the column header that is labeled "PID" to sort the process by their PIDs. You should be able to easily find the process ID and match it to the program that is listed in Task Manager.
If you know that your Titan Server will be listening on port 21 (or port 22 for SFTP), you can further focus the output by using 'findstr', such as
netstat -p tcp -ano | findstr :21
This will search the netstat output for any entry that is using port 21. You can specify :22 instead of :21 to find services listening on port 22.
Article Details
Article ID:
140
Created On:
Jan 03 2007 04:54 AM
This answer was helpful
This answer was not helpful
User Comments
Add a Comment
Posted By: PJB On: Jul 24 2008 11:27 AM
You can also use netstat -a -n -p tcp -b and it will show you all the ports and services that are running as long as you are using xp or above OS.
Sharing is good. If you have a comment about this entry, please feel free to share. The comments might be reviewed by our staff, and may require approval before being posted. Questions posted will not be answered. Please submit a Ticket for support requests.
Fullname:
Email: (Optional)
Comments:
Login
[Lost Password]
Email:
Password:
Remember Me:
Search
-- Entire Support Site --
Knowledgebase
Article Options
Add Comment
Print Article
PDF Version
Email Article
Add to Favorites
Home
|
Register
|
Submit a Ticket
|
Knowledgebase
Language:
English (U.S.)
South River Technologies, Inc.