PID -> User (I need to know the user of a PID) | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


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 !!

PID -> User (I need to know the user of a PID)

UNIX for Dummies Questions & Answers


Tags
linux

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-28-2003
Kh@lid Kh@lid is offline
Registered User
 
Join Date: Jun 2003
Last Activity: 15 September 2003, 12:39 PM EDT
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Question PID -> User (I need to know the user of a PID)

Hello,

There is a very high load on the mySQL in my server (Unix/Linux (WHM - RedHat 7.3)), in 'TOP' I knew the PID numbers that make the load on the memory... So how can I now the user of this PID?

It's very hard to get it from 'Apache Status' at WHM..

So please help !

(High Priority)
Sponsored Links
    #2  
Old 06-28-2003
minazk
Guest
 
Posts: n/a
What did you mean by user of the PID?
Coz top shows the owner of the process under the USERNAME field.
If you need to see the child processes if any,
# ps -ef | grep 'PID'

Hope it helps.

Last edited by minazk; 06-28-2003 at 03:18 PM..
Sponsored Links
    #3  
Old 06-28-2003
Kh@lid Kh@lid is offline
Registered User
 
Join Date: Jun 2003
Last Activity: 15 September 2003, 12:39 PM EDT
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

I mean the owner of the PID, or which domain or login (username) doing this process.

I hope you know what I mean.
    #4  
Old 06-28-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
 
Join Date: Aug 2002
Last Activity: 3 October 2004, 6:07 PM EDT
Location: Cleveland, OH
Posts: 804
Thanks: 0
Thanked 5 Times in 4 Posts
You mean this?
Code:
$ ps --fields="user pid tty command"

    USER    PID TT      COMMAND
userName  72966 tty10   ps.exe
userName 105867 tty10   ksh.exe

Sponsored Links
    #5  
Old 06-28-2003
Kh@lid Kh@lid is offline
Registered User
 
Join Date: Jun 2003
Last Activity: 15 September 2003, 12:39 PM EDT
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks, Could you please give me an example how to write this command? As you know, i'm not pro in SSH
Sponsored Links
    #6  
Old 06-28-2003
oombera's Avatar
oombera oombera is offline Forum Advisor  
Registered User
 
Join Date: Aug 2002
Last Activity: 3 October 2004, 6:07 PM EDT
Location: Cleveland, OH
Posts: 804
Thanks: 0
Thanked 5 Times in 4 Posts
I'm not sure what you mean.. if you type ps --fields="user pid tty command" at your Unix prompt, then you should get output similar to what I put. You'll get a list of things running along with the user running them.. what else would you like to do with the output?
Sponsored Links
    #7  
Old 06-29-2003
Kh@lid Kh@lid is offline
Registered User
 
Join Date: Jun 2003
Last Activity: 15 September 2003, 12:39 PM EDT
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

It show me this:
PHP Code:
# ps --fields="user pid tty command"
pserrorUnknown gnu long option.
usageps -[Unix98 options]
       
ps [BSD-style options]
       
ps --[GNU-style long options]
       
ps --help for a command summary 
?
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Update LDIF User info based on Test User Certs ID's Macdaddy99 Shell Programming and Scripting 3 07-14-2010 11:25 AM
Determining if user is local-user in /etc/passwd or LDAP user ckmehta UNIX for Advanced & Expert Users 5 04-28-2010 03:24 AM
root user command in shell script execute as normal user mnmonu Shell Programming and Scripting 3 10-19-2009 07:42 AM
Difference between : Locked User Account & Disabled User Accounts in Linux ? avklinux UNIX for Dummies Questions & Answers 3 02-06-2009 08:01 PM
How do i change to super user then revert back to ordinary user ,using shell script? wrapster Shell Programming and Scripting 3 06-04-2008 07:11 AM



All times are GMT -4. The time now is 08:21 PM.