March 16, 2010, 19:30:43 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Check your Page Rank, Backlinks, or Link Popularity in our tools section.
 
  Home   Forum   Help Search Directory Calendar Login Register    RSS 2.0 feedAtom feed


News
Check your Page Rank, Backlinks, or Link Popularity in our tools section.
IT Resources
Pages: [1]
  Print  
Author Topic:

Open port

 (Read 2046 times)
0 Members and 1 Guest are viewing this topic.
xulescu
Administrator
Full Member
*****

Points: 8
Offline Offline

Posts: 249


WWW
« on: July 17, 2006, 03:58:20 »

Hi,

 I don't know in what forum to put this question ... if is not ok please moveit.

 How can I see what program is listening on a specific port ? I get an error on  my mysqlserver and it tell me something about "The port 3306 is already used" ...

Logged



TheGodFather
Administrator
Hero Member
*****

Points: 202
Offline Offline

Posts: 2571



WWW
« Reply #1 on: July 17, 2006, 04:05:33 »

Hi,

 To see if the port is used (is listening) then :

Code:
#for tcp
netstat -tnl
#for udp
netstat -unl

To see what process (program) is using a specific port then:

Code:
fuser -n tcp 80

where 80 is the port. You will get minimum 1 pid or more if is a multithreaded server (apache for example). Ex:

Code:
80/tcp:               2193  2277  2278  2279  2295  2813  3982  3983  8733  8734  8739

Now if you see what process it is :

Code:
ps auxwww | grep 2193

and the answer will be
Code:
root      2193  0.0  6.0 30232 7628 ?        Ss   Jul16   0:00 /usr/sbin/apache2 -k start -DSSL

It's enough for you ?

Regards
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
Valid XHTML 1.0! Valid CSS!