LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-03-2012, 11:05 PM   #1
marcos egatz
LQ Newbie
 
Registered: Nov 2008
Posts: 8

Rep: Reputation: 0
show user invoker name of a process


Hi,
This question could be somehow naive, but Is there some way to establish the user who started a given process? I know that any program already have an owner, although It may also happen, that this process could have execution permissions to other users. The doubt is when I analyze a process which is already running(e.g. java process), through issuing ps command, and I don't know who might have invoked or started it.

thanks
 
Old 02-04-2012, 03:45 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Are you looking for something like pstree?

The following would show all processes in a tree. It also shows which process spawned another and who is the owner.
Code:
pstree -Acu
A smaller list can be created by giving a starting pid (i.e. pstree -Acu PIDNUMBER)

Hope this is what you are looking for.
 
1 members found this post helpful.
Old 02-04-2012, 03:50 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...additionally if your distribution is capable of running the auditd service it would be easy to log extended information.
* Java has diagnostics utilities for the JVM side of things but that's all I know as I don't need to deal with Java.
 
Old 02-04-2012, 07:50 AM   #4
markseger
Member
 
Registered: Jul 2003
Posts: 244

Rep: Reputation: 26
For doing things programmatically my favorite command is this:

all process by pid and parent pid. all you need to know

ps -axopid,ppid,cmd

I think the ps -o switch might be one of the most useful as with it you can show almost anything.

-mark
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPC fails between user process and root process zaryab Linux - Newbie 1 09-22-2008 01:25 AM
proftpd multi-user configuration, user cannot show contents of directories uglyoldbob Linux - Server 6 09-15-2008 11:18 PM
show process ust Linux - Software 4 07-15-2008 02:59 AM
Is there a way to show the output of background process? nadavvin Linux - General 1 05-27-2007 11:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration