Ad Widget

Collapse

computing idle time from SystemStats

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hla
    Junior Member
    • Nov 2006
    • 1

    #1

    computing idle time from SystemStats

    I actually found today that at least for net-snmp 5.2.2 on solaris 8 the following is incorrect:

    total = (
    ssCpuRawSystem +
    ssCpuRawUser +
    ssCpuRawWait +
    ssCpuRawIdle +
    ssCpuRawKernel
    )

    The net-snmp code (5.2.2 at least) actually defines ssCpuRawSystem as

    ssCpuRawSystem = ssCpuRawKernel + ssCpuRawWait

    I found that dropping ssCpuRawSystem from the above equation got me values within 0.5% of 100 for total, which is accurate enough.

    On top of that, you need to define idle as

    cpuidle = ssCpuRawIdle + ssCpuRawWait

    for multiprocessing systems :-)

    Maybe DOS would waste cpu time waiting for i/o, but it's the process
    that's waiting - the cpu is available for other tasks.

    Of course, this all assumes we're talking about deltas.

    Regards,
    Henk
Working...