Solved

how to find PORT number of a particular program through command prompt

Posted on 2007-03-28
5
16,820 Views
Last Modified: 2012-05-05
Can anyone please tell me where I can find a command that shows what PORT number a particular program utilizes from "command prompt"?  I tried doing it from the C drive program files, but it does not work and have no idea how to do it from a command prompt.
thank you.
0
Comment
Question by:systems_ax
5 Comments
 
LVL 70

Expert Comment

by:KCTS
ID: 18812136
The port or ports a program uses is dependant on the services it uses. There is no easy way to determine this but the netstat program may reveal some useful info see http://support.microsoft.com/kb/281336
0
 

Expert Comment

by:eger
ID: 18812165
Hi,

From the command prompt using netstat and that -b switch will show the process PID and name for listening and active connections. An example from the cmd line would look something like: "C:\>netstat -anb".

Alternatively there is a utility called TcpView which gives listening sockets and process names with them in a easy to view list that also automatically updates itself. You can view and download the program here: http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx

Hope this helps!
0
 
LVL 14

Accepted Solution

by:
Burns2007 earned 250 total points
ID: 18812334
netstat -ab | find "LISTENING" <-- will show you what process ID is listening on a port.

netstat -ab will show all active ports and associated processes.
0
 
LVL 2

Expert Comment

by:jaredcall
ID: 18812343
"netstat -b"

you might like "netstat -bn" better.

-jared
0
 
LVL 1

Author Comment

by:systems_ax
ID: 18812544
Thank you
Burns2007
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question