From: Dolphin on
Hi,

Is it possible to convert the cpu load average (5min) got from the
output of uptime to cpu utilization in %? If so, how to?

Thanks in advance.
From: Ian Collins on
Dolphin wrote:
> Hi,
>
> Is it possible to convert the cpu load average (5min) got from the
> output of uptime to cpu utilization in %? If so, how to?

Load average is for the system, not the (a) CPU.

--
Ian Collins
From: Andrew Gabriel on
In article <bb06aac4-258c-453f-9648-85cc4df0121a(a)g1g2000pra.googlegroups.com>,
Dolphin <yc282004(a)yahoo.com.sg> writes:
> Hi,
>
> Is it possible to convert the cpu load average (5min) got from the
> output of uptime to cpu utilization in %? If so, how to?
>
> Thanks in advance.

loadave is (average) count of runnable threads, regardless if
they are running on a CPU or waiting to run, and modulo
sampling errors.

Whilst CPU usage can't exceed 100%, loadave can exceed number
of CPUs. I think all you can say is that if loadave < number
of CPUs, then there's some idle time. However, with cores
and strands nowadays, just what a CPU is in this context
isn't really clear anymore either.

So the answer is basically No.

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]
From: David Combs on
In article <hg3ije$6ft$1(a)news.eternal-september.org>,
Andrew Gabriel <andrew(a)cucumber.demon.co.uk> wrote:
>In article <bb06aac4-258c-453f-9648-85cc4df0121a(a)g1g2000pra.googlegroups.com>,
> Dolphin <yc282004(a)yahoo.com.sg> writes:
>> Hi,
>>
>> Is it possible to convert the cpu load average (5min) got from the
>> output of uptime to cpu utilization in %? If so, how to?
>>
>> Thanks in advance.
>
>loadave is (average) count of runnable threads, regardless if
>they are running on a CPU or waiting to run, and modulo
>sampling errors.
>
>Whilst CPU usage can't exceed 100%, loadave can exceed number
>of CPUs. I think all you can say is that if loadave < number
>of CPUs, then there's some idle time. However, with cores
>and strands nowadays, just what a CPU is in this context

What's a "strand"? THANKS!

>isn't really clear anymore either.
>
>So the answer is basically No.
>
>--
>Andrew Gabriel
>[email address is not usable -- followup in the newsgroup]

David