If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > getting PID for a process running on a port.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-03, 13:31
amit_kaps amit_kaps is offline
Registered User
 
Join Date: Nov 2003
Location: Pune, India
Posts: 22
getting PID for a process running on a port.

Hi,
How do i get the process id of a process runnig on a particular port.
__________________
Regards,
Amit.K.
Reply With Quote
  #2 (permalink)  
Old 12-05-03, 16:40
fla5do fla5do is offline
Registered User
 
Join Date: Oct 2003
Location: Germany
Posts: 138
ps -t ttyXYZ
or
ps -ef | grep ttyXYZ

but you donīt see a getty with this commands.

then you better use ps -ef | grep getty
__________________
Greetings from germany
Peter F.

Last edited by fla5do; 12-05-03 at 16:46.
Reply With Quote
  #3 (permalink)  
Old 12-08-03, 00:50
amit_kaps amit_kaps is offline
Registered User
 
Join Date: Nov 2003
Location: Pune, India
Posts: 22
Hi,
Let me illustrate as to what problem i am facing.

i need to run a weblogic server on the port 7001,
but that port is being used by some other process (i dont know the pid or the owner of the process).

now i need to find out some information about that process, so that i can inform the concerned person of the same.

now fir the port 7001 on the machine, i need to find out the information about the process that's running- PID, Owner etc.
__________________
Regards,
Amit.K.
Reply With Quote
  #4 (permalink)  
Old 12-08-03, 11:51
fla5do fla5do is offline
Registered User
 
Join Date: Oct 2003
Location: Germany
Posts: 138
Hello Amit,
I thought you need informations about ttyīs , I was realy on the woodway.
Try this :
look in /etc/services
or use netstat .
netstat has a lot of parameters. I dont know all of them, but I think you
get help by using the man command. (man netstat)
__________________
Greetings from germany
Peter F.
Reply With Quote
  #5 (permalink)  
Old 12-08-03, 13:49
amit_kaps amit_kaps is offline
Registered User
 
Join Date: Nov 2003
Location: Pune, India
Posts: 22
Hi Peter,

Actually, i'd already tried that.
but there doesn't seem to be any option to get a correlation between the two.

dont know if there is any other standard utility that gives this info...?
__________________
Regards,
Amit.K.
Reply With Quote
  #6 (permalink)  
Old 12-08-03, 13:57
fla5do fla5do is offline
Registered User
 
Join Date: Oct 2003
Location: Germany
Posts: 138
Hi Amit.
what a bummer that it donīt work . I have no more idee for your problem.
__________________
Greetings from germany
Peter F.
Reply With Quote
  #7 (permalink)  
Old 12-09-03, 08:54
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Quote:
Originally posted by amit_kaps
Hi Peter,

Actually, i'd already tried that.
but there doesn't seem to be any option to get a correlation between the two.

dont know if there is any other standard utility that gives this info...?
man fuser
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On