The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 07: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 07: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
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-14-2002
jamesloh jamesloh is offline
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.
  #2 (permalink)  
Old 10-15-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
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
jamesloh jamesloh is offline
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?
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
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