![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| estimating memory usage by database processes | hariza | AIX | 2 | 09-17-2008 11:09 PM |
| how to get list of processes | yaron | High Level Programming | 13 | 06-04-2008 07:20 AM |
| how to print the date and time separately??? | jisha | Shell Programming and Scripting | 8 | 01-16-2008 06:23 AM |
| can I save list of files in memory and not in text file? | umen | Shell Programming and Scripting | 1 | 06-05-2006 04:27 AM |
| memory list... | danhash | UNIX for Dummies Questions & Answers | 3 | 07-21-2003 02:57 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 platforms but on AIX, I was not able to find top, but only topas. Unfortunately topas do not have an option of running in batch mode. For instance, I can tell top to run for one count/iteration and wite the output to a file, which in turn can be beaten up using any text processors to display the output I desire. topas can't I tried using the output of ps -ef |sort -n -k 7 but 7th field is returning wonky results on the output of ps -ef. SO this stopped being an option. Is there any way to get an output from topas as one can get from top ? If yes, how ? I am also open to other suggestions than topas as the monitor. I also have nmon on these aix boxes if it can be used for this purpose. Thanks for all suggestions in advance. |
|
||||
|
Thank you.. The output will be sufficient for a quick and dirty peek at the CPU hogs.
---------- Post updated at 10:20 AM ---------- Previous update was at 09:51 AM ---------- my hpux solution: top -d 1 -n 10 -f /tmp/file; tail -11 /tmp/file my Linux (RHEL) solution: top -b -n 1 | sed -e "1,6d" | head -11 fyi... |
|
|||||
|
Hi,
for AIX I am using: Displaying top CPU_consuming processes Code:
ps aux | head -1; ps aux | sort -rn +2 | head -10 Code:
ps aux | head -1; ps aux | sort -rn +3 | head Code:
ps vx | head -1; ps vx | grep -v PID | sort -rn +6 | head -10 Code:
ps -eakl | sort -n +7 Code:
ps vx | head -1; ps vx | grep -v PID | sort -rn +4 | head -10 zxmaus |
![]() |
| Bookmarks |
| Tags |
| aix, monitoring, nmon, top, topas |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|