How do I get percentage CPU usage of processes for a specified time interval? - Aix
This is a discussion on How do I get percentage CPU usage of processes for a specified time interval? - Aix ; 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" ...
-
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=
-
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).
-
Re: How do I get percentage CPU usage of processes for a specified time interval?
On Feb 16, 3:35 am, "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...
>
> 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