• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

DOS command to get active ports?

Felecha

Golden Member
I seem to remember there was a DOS command I was shown once -- it would tell you what ports were actively listening at the time. Like ipconfig will tell you your IP address.
 
well, that shows all my network connections but what I was after was this. I'm a student and I'm trying to figure out how to write a java class that will connect to a database and get data. I'm puzzled why something's not working and thought it might have to do with port assignments for the database server and even though I'm almost sure I know the port number, I thought if I could get DOS to tell me all the active ports and what processes are listening on them, that could be a clue for me.
 
I found my connection problem. The database server has two versions, one for local, one for network. I had called the local version. When I started it up as the network version, my client found it and connected and returned the results of my test query. So I'm OK, but I'm still curious. I recall someone showing me about a month ago, how to give some DOS command that put up a list of all the ports currently listening on the machine
 
netstat -a will certainly work, but netstat -ao is better. The -o switch only works on XP, but it will tell you the pid of the process that listen()'d on that port.

Even better than netstat -ao is fport. Not only does it show you the listening ports and the pid of the listen()ing process, it shows you the path to the process as well.

 
Back
Top