list which process using how many cpu


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting list which process using how many cpu
# 1  
Old 08-02-2010
list which process using how many cpu

i want to list which process using how many cpu ,but i must be list cpu rate and process name,not only PID

how can i do?

# 2  
Old 08-02-2010
There is much variation in the "ps" command. Please state which Operating System and version you have, and which Shell you are using.
# 3  
Old 08-02-2010
You can use the 'top' command
It will display the output in the following way -
PID PSID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
1421 1378 rawalm 1 18 0 127M 111M cpu6 0:27 6.10% rdc
32267 3230 rujuraha 1 15 0 78M 3528K cpu7 0:00 0.07% top
27084 2000 root 1 18 2 13M 11M sleep 6:10 0.00% appwatch
# 4  
Old 08-02-2010
SunOs and ksh shell using...
# 5  
Old 08-02-2010
You can use mpstat or prstat to see how busy your system and CPU(s) are.

Why do you care what process is running on which CPU? That can and does change very rapidly, maybe hundreds or thousands of times a second. Simply running whatever utility you use to observe that will change the result.
# 6  
Old 08-02-2010
i want to average which process using how many cpu...

i take a data every 10 minutes and calculate average all process ...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If a process cpu % is higer than

Is this possible as part of a bigger script to do? eg: elif myprocess.bin cpu% > 12 exit 1 elif is there a command for this? thanks (9 Replies)
Discussion started by: bilboNIX
9 Replies

2. Emergency UNIX and Linux Support

CPU and memory utilization of a process, by process name

Can someone please help me with a script that will help in identifying the CPU & memory usage by a process name, rather than a process id.This is to primarily analyze the consumption of resources, for performance tweaking. G (4 Replies)
Discussion started by: ggayathri
4 Replies

3. Solaris

process CPU time

We are using JAVA program and strange thing is it takes 100% CPU when not in use. The program function is to stream a file on output port (one direction). It checks one directory and when there is a file in it, starts. While it is streaming the CPU usage is normal, about 20%. But, if... (9 Replies)
Discussion started by: orange47
9 Replies

4. Shell Programming and Scripting

CPU Usage of a process

Hi guys, I am currently writing a JAVA script to monitor certain unix processes through JConsole. Upon having lots of trouble with runtime.exec, i decided to bypass the top/ps command call and just get the information straight from /proc/*pid*/whatever. Now i can pull back any... (0 Replies)
Discussion started by: matt9949
0 Replies

5. Red Hat

Process by CPU

Hello All, I am preparing a script to capture the processes consuming more CPU. So is there any way that i can sort & redirect to file only those processes consuming more than 5.0 % using ps command itself. Regards Ankit (3 Replies)
Discussion started by: ajaincv
3 Replies

6. Shell Programming and Scripting

CPU Usage for a particular process

Hi, I have a shell script. But, upon execution of the same, the cpu usage is sometimes getting 100 % (checked executing top command). At that point of time, my process hangs, doesn't run anymore. I need to kill it manually. My concern is, is there any default method, by which I can check... (1 Reply)
Discussion started by: jitendriya.dash
1 Replies

7. UNIX for Dummies Questions & Answers

how to get persistant cpu utilization values per process per cpu in linux (! top,ps)

hi, i want to know cpu utilizatiion per process per cpu..for single processor also if multicore in linux ..to use these values in shell script to kill processes exceeding cpu utilization.ps (pcpu) command does not give exact values..top does not give persistant values..psstat,vmstat..does njot... (3 Replies)
Discussion started by: pankajd
3 Replies

8. Solaris

How to find which process is using up too much CPU

Hi, I need to find which processes are hogging the cpu up. please advise. Thanks (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

9. UNIX for Dummies Questions & Answers

process not using enough cpu

I am running solaris 9 on a SUn 480r. It is running SAS statistical software, these processes in full flow normally run at about 50-60% cpu (theres nothing else really running on the box) this is fine, and the SAS jobs get run nice and quick. However over the last few weeks everytime a SAS job is... (1 Reply)
Discussion started by: hcclnoodles
1 Replies

10. UNIX for Advanced & Expert Users

process -> 1 cpu

Is there a way I can assign processes to different processors? I know in windows xp you can set process affinity, and wondered if there is a *nix equivelant. (2 Replies)
Discussion started by: Solitare
2 Replies
Login or Register to Ask a Question