Solved

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

Posted on 2007-03-28
5
16,827 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

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

When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
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.

623 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