Top procs


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Top procs
# 1  
Old 06-21-2005
Top procs

Hi All

Does anyone have a way of finding out which are the top 10 proc's consuming CPU and memory from a script ?

I have loooked into ps, however cannot get a clear picture.

Thx

J
# 2  
Old 06-21-2005
I forgot to mention, this is for AIX 5.2 system..
# 3  
Old 06-22-2005
I use the following on linux?

ps -e -o pmem=,rss=,args= | sort -b -k1,1n
# 4  
Old 06-22-2005
Previous one was for mem, this is for CPU (again on linux):

ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d'
# 5  
Old 06-24-2005
I use Digital Unix, and when i need something like you i do this:

Code:
$ cd /usr/local/bin
& top

And this show me all the CPU usage from the higest to the lowest, maybe you can send this to another file using:

Code:
top > myfile

try this and tell me what happended plz, and forgive me if i write wrong but english is not my language :P
# 6  
Old 06-24-2005
You may want to try topas command
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

--killing backround Procs spawned from the parent script with Ctrl+C trap

Hello: Am trying to understand why the method #2 works but method #1 does not. For both methods, sending CTRL+C should kill both the Parent script & all of the spanwd background procs. Method #1: ========================== #!/bin/sh ctrl_c() { echo "** Trapped CTRL-C" ... (3 Replies)
Discussion started by: gilgamesh
3 Replies

2. Shell Programming and Scripting

Trying to filter user procs older than n days

Hello; Trying to filter user procs older than n days from todays date. The data I have to work with: UNIX95= ps -ef -o user,pid,ppid,cpu,etime,stime | grep "-" | grep -v ^root |more daemon 2048 1 0 47-01:55:24 Dec 2 dslgrai 4352 4351 0 6-00:13:00 Jan 12 sfmdb 2425 ... (2 Replies)
Discussion started by: delphys
2 Replies

3. Shell Programming and Scripting

KSH to execute stored procs/ctrl files

I am needing to call sqlplus and sqlldr in the same korn shell script. Below are the steps that I need to accomplish. I am new to Oracle shell scripting so an example would be great. CBOB_LOAD.KSH - script name Calls Oracle stored procedure sp_CBOB_CLEAR_LN_STAGING (SERVER: TESTSVR100) Calls... (0 Replies)
Discussion started by: acewilli
0 Replies

4. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies

5. AIX

Top command in AIX 4.2 (no topas, no nmon, no top)?

Is there a 'top' command equivalent in AIX 4.2 ? I already checked and I do not see the following ones anywhere: top nmon topas (1 Reply)
Discussion started by: Browser_ice
1 Replies

6. UNIX for Dummies Questions & Answers

Help using top and ps

help! i need help with locating where a program is being run from. when i type top -i it only lists the name and minimal info, not the programs location from where it is being ran. i ask because i just used the same named executable, a.exe for all the processes and have lost the schedule detailing... (4 Replies)
Discussion started by: shabs1985
4 Replies

7. HP-UX

HP-UX and 'top'

I've been working with an HP-UX system (RP5400 Series PA-RISC server) for about a year that hosts some middleware. The middleware sits between an Oracle DB (on another box) and the client applications running on about 800 PCs. From the beginning, I've noticed that 'top' reports between 0.0% and... (8 Replies)
Discussion started by: deckard
8 Replies

8. AIX

4 procs, can I slice ?

if the system pegs at 100%, can I reserve .2cpu to allow for logins and such? the oracle rman/other activities take up some resources on occassion ... 3.8 procs for the system and .2 reserved? I'm not sure how to tackle this issue ... is this a good use for WLM? any thoughts? (1 Reply)
Discussion started by: A Stewart
1 Replies

9. UNIX for Dummies Questions & Answers

Executing Oracle Stored Procs from Korn Shell

Can someone tell me how to execute an Oracle Stored Procedure from a Korn Shell Script. Previously, I'm able to execute standard sql using the following:- The_Output=`sqlplus................. << EOF select count(*) from abc / ... (3 Replies)
Discussion started by: Vinny_Mitchell
3 Replies

10. UNIX for Dummies Questions & Answers

How Can I Have Top Display The Top 20 Processes??

how can i do that in a script withough havin the script halt at the section where the top command is located. am writign a script that will send me the out put of unx commands if the load average of a machine goes beyond the recommended number. top -n 20 i want to save this output to a file... (1 Reply)
Discussion started by: TRUEST
1 Replies
Login or Register to Ask a Question