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" ...

+ Reply to Thread
Results 1 to 3 of 3

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

  1. 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=


  2. 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).

  3. 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


+ Reply to Thread