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
printing each users by processes sam4now Shell Programming and Scripting 12 04-28-2008 06:11 PM
Processes and Users barbus Shell Programming and Scripting 22 10-03-2007 07:09 PM
i need a scipt to email users with idle processes!? sheppy28 Shell Programming and Scripting 0 02-02-2007 04:08 PM
Displaying the processes of users olimiles Shell Programming and Scripting 2 08-18-2006 02:57 PM
Users and processes Chiefos UNIX for Dummies Questions & Answers 17 06-17-2006 04:16 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-10-2007
iago iago is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 20
users and there processes

I am trying to write a script to list all users and their processes. I cant seem to find out how to link the PID to the user. For example if i run ps -a I get a nice list of all the processes running and their PID, but no information about which user is running them. I need the users real name not login in name so Joe Bloggs instead of joe.bloggs

The output should look similar to this.


Joe Bloggs
PID TTY TIME CMD
31799 pts/3 00:00:00 vim
31866 pts/3 00:00:00 vim
2495 pts/7 00:00:00 vim
8368 pts/0 00:00:00 vim
9544 pts/2 00:00:00 ps

Henry Hill
PID TTY TIME CMD
8368 pts/0 00:00:00 vim
9544 pts/2 00:00:00 ps

anyone any ideas
  #2 (permalink)  
Old 09-10-2007
liketheshell liketheshell is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 21
try ps -ef
  #3 (permalink)  
Old 09-10-2007
arunsubbhian arunsubbhian is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 14
Smile sorry if im wrong

ps -aux | grep Henry
  #4 (permalink)  
Old 09-10-2007
iago iago is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 20
yeah i dont think im getting the right one. i want the one ps with no options gives u but for all the users. my trouble then is going to be printing there real name along with there processes, anyone any ideas.
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 02:12 PM.


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