Command to check the CPU usage for particular user


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Command to check the CPU usage for particular user
# 1  
Old 11-09-2010
Question Command to check the CPU usage for particular user

Hi All,

Can anybody knows, how to check the CPU usage in percentage for a particular process along with its user and PID?

Thanks in advance!!
# 2  
Old 11-09-2010
Command top lets you know of the useful information such as total memory, memory in use, % of total memory used by each process, % cpu usage of each process, and process ID (PID) of each process. Some of the options to it
Code:
top -u <user_name>
top -p <pid>

# 3  
Old 11-09-2010
Have a look at the man page of "ps", especially the "-o" option and its various arguments. For instance, the following will show the CPU%, the PID and the CMD columns of each process, sorted by CPU consumption:

Code:
ps -Alo pcpu,pid,args | sort -rn

You might probably want to modify the command according to your needs and what you find in the man page.

I hope this helps.

bakunin
# 4  
Old 11-09-2010
Thanks for the reply guys!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Ps command on cpu usage and time

Hi All, Am very new to Linux and unix ...need below help . need to list of process consuming more than 40% cpu and which are older than 10 days of a particular user .... Thanks V (4 Replies)
Discussion started by: venky456
4 Replies

2. Solaris

How can i restrict user high cpu usage?

HI In my M5000 , one of domain is having SAp installed. from today onwards we are facing some stange issue. when we start SAP application, that particular user is taking 95 % of system CP and renaming 5 % is taken by system . because of this reason application is slow. i have 4 CPU(32... (4 Replies)
Discussion started by: bentech4u
4 Replies

3. UNIX for Dummies Questions & Answers

Is total CPU usage for sar %user+%system+%iowait?

Hi all Can anyone advise/confirm whether total CPU usage when running sar is %user+%system+%iowait or is it %user+%system only? I want to confirm whether I am having a CPU-bound problem or not. This is a single-CPU VMware machine. $ sar 5 20 Linux 2.6.18-238.5.1.el5... (7 Replies)
Discussion started by: newbie_01
7 Replies

4. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

5. HP-UX

CPU usage per user

Hello everybody, How can we proceed to measure the CPU used par a user on unix HPUX ? there some commands or tools ? Thank you in advance. (4 Replies)
Discussion started by: mlaiti
4 Replies

6. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

7. UNIX for Dummies Questions & Answers

How check the overall CPU usage of the unix server

Hi All, Can anyone help me.. I want to know the command to check the overall CPU usage of the server. Note: I don't want the CPU usge of each and every process. I just want to know thw aggregate CPU utilization of the server. (2 Replies)
Discussion started by: Selva_Kumar
2 Replies

8. Shell Programming and Scripting

check cpu usage

Hi, Are there previous threads on perl scripts that check the cpu usage and send email whenever this exceeded a certain threshold? Thanks. (3 Replies)
Discussion started by: gholdbhurg
3 Replies

9. HP-UX

How to summary one command's cpu usage?

I want to record one application's(like oracle etc...) CPU usage summary. I can filter by "ps". But how to sum? Thanks (1 Reply)
Discussion started by: jiarong.lu
1 Replies

10. HP-UX

How to determine cpu&memory percentage usage per user

Using HP-UX v11 Need to monitor cpu and memory usage, total for system and separately for each user in command-line mode. Found out next ways to monitor total cpu usage under hp-ux: 1) vmstat, also shows free memory 2) sar -M ps -eo user,pcpu - does not work, means 'user-defined format'... (4 Replies)
Discussion started by: hp-ux-user
4 Replies
Login or Register to Ask a Question