Unix Technical Forum

How do I get percentage CPU usage of processes for a specified time interval?

This is a discussion on How do I get percentage CPU usage of processes for a specified time interval? within the AIX Operating System forums, part of the Unix Operating Systems category; --> How do I get percentage CPU usage of processes for a specified time interval? I'm wish to write a ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 12:17 PM
Adrian Davis
 
Posts: n/a
Default How do I get percentage CPU usage of processes for a specified time interval?

How do I get percentage CPU usage of processes for a specified time
interval?

I'm wish to write a script, part of which displays the top 10
processes by percentage processor usage over a 30 second interval. I
know "topas" can show this, but I need to be able to process the
information in a script. The output from "ps" doesn't seem to give the
neccessary resolution...

Can anybody give me some pointers as to how this can be done?

Many Thanks,
=Adrian=

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 12:17 PM
Gary R. Hook
 
Posts: n/a
Default Re: How do I get percentage CPU usage of processes for a specifiedtime interval?

Adrian Davis wrote:
> How do I get percentage CPU usage of processes for a specified time
> interval?
>
> I'm wish to write a script, part of which displays the top 10
> processes by percentage processor usage over a 30 second interval. I
> know "topas" can show this, but I need to be able to process the
> information in a script. The output from "ps" doesn't seem to give the
> neccessary resolution...


You need to look into using nmon, as it can produce output
that can be analyzed in that fashion (e.g. nmon Analyzer).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 12:17 PM
Ashok Sangra
 
Posts: n/a
Default Re: How do I get percentage CPU usage of processes for a specified time interval?

On Feb 16, 3:35 am, "Adrian Davis" <adr...@satisoft.com> wrote:
> How do I get percentage CPU usage of processes for a specified time
> interval?
>
> I'm wish to write a script, part of which displays the top 10
> processes by percentage processor usage over a 30 second interval. I
> know "topas" can show this, but I need to be able to process the
> information in a script. The output from "ps" doesn't seem to give the
> neccessary resolution...
>
> Can anybody give me some pointers as to how this can be done?
>
> Many Thanks,
> =Adrian=


You can run "tprof -x sleep 30" and then use awk/grep to filter infor
from the generated sleep.prof file.
HTH

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:03 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com