The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
script to monitor process running on server and posting a mail if any process is dead pradeepmacha Shell Programming and Scripting 13 03-06-2009 06:33 AM
How to configure a FC HBA in "initiator mode"? Bookie AIX 5 05-15-2008 06:28 PM
Killing of a process and send a mail if the process doesnot come up within 2 minutes Prince89 Shell Programming and Scripting 1 02-15-2008 06:10 PM
how to start a process and make it sleep for 5 mins and then kill that process shrao Shell Programming and Scripting 6 03-27-2007 12:54 PM
my process is going to sleep mode after 12 hours but i need my process in in firsy pr mukesh_rakesh1 UNIX for Advanced & Expert Users 0 09-05-2006 02:43 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-14-2002
Registered User
 

Join Date: Aug 2002
Location: Taiwan
Posts: 5
Process and its initiator's IP

Hi,

Is there a command that will tell me which client machine started a process on my Solaris server?

what I'm trying to do is that :
I've noticed someone is running a program (in my case, the Oracle sqlplus program) by using a "ps -ef | grep sqlplus". Then I use "who" and "finger" and there is only me who is currently on the system. Can I somehow use the process id and some network related commands to find out the ip or machine name of whoever started the process?

Thx.
Sponsored Links
  #2 (permalink)  
Old 10-15-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,042
You should be giving each user a unique id which is used to login to your system. This id would then appear in the UID field of your "ps" listing. Then you would know the user who started the process and if you really cared which workstation he used to start the process you could just ask him. But this won't work if you let many people log on as "oracle" or something.

If there is a value like "pts/23" in the TTY field, you can try "ps -ft pts/23" and get all the processes using that tty.

The start time of the process (STIME) may be a clue. You can see who was logged on at that time by checking your wtmp file. (who /var/adm/wtmp)

You can look at the PPID field to get the parent. And get the parent of that and so on all the way to pid 1. Ignore pid 1 and look at the process whose parent is 1. If this is inetd, look at the next process in the chain. If this is something like xterm or telnetd, it will have a connection to a remote system. You can use "lsof -p" to see that connection.
  #3 (permalink)  
Old 10-15-2002
minazk
Guest
 

Posts: n/a
Bits: 0 [Banking]
Try using " who -h all "

It will display the list of users currently logged in with their ip addresses.


MK
  #4 (permalink)  
Old 10-22-2002
Registered User
 

Join Date: Aug 2002
Location: Taiwan
Posts: 5
process history

is there any system log that I can check to find out what client machines (machine name or ip) started a unix server process (which is no longer running)?

What I'm trying to do is that I have an trace file from an application which tells me what its unix process number was when the error occurred. And I would like to know if there is anyway of mapping this process number to the machine that started the process.

Does solaris keep track of its process somewhere in the system log?
Google The UNIX and Linux Forums
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:




All times are GMT -4. The time now is 06:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66