Ask the Expert

Closing a port

I have found port 1521 open on my system. Since I dont have ncube, I want to follow your suggestion and shut the port down to see what breaks. How do I shut down a port?

    Requires Free Membership to View

Remember I also said that port 1521 is used by a number of SQL programs, so if you are running any sort of database server, that may be the answer to your question.

However, if you want to find out what is running on which port of your system, it's reasonably easy to figure that out. Alas, you didn't tell me what operating system you're running, so it's hard to give specific details.

However, under most Unixes, the "netstat" program will tell you what ports are being used by what process number. So "netstat | grep 1521" should show you what process number is using port 1521, then you can use "ps" to tell you what that process number is running. Under Linux (and some others) there is a -p option to netstat that will tell you what program and process number is using that port. Under BSD Unix, the "sockstat" command will do similar things.

Under Windows NT and 2000, there is also a netstat command, but it doesn't tell you what process numbers are using the ports, only that the ports are in use, so you will need to look at the task manager and make some intelligent guesses.

This was first published in July 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: