9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Understanding milli-CPUs (/dev/sysstat)
@ 2022-01-07 12:01 sirjofri
  2022-01-07 15:10 ` Benjamin Riefenstahl
  0 siblings, 1 reply; 4+ messages in thread
From: sirjofri @ 2022-01-07 12:01 UTC (permalink / raw)
  To: 9front

Hello all,

According to cons(3), load inside /dev/sysstat is a number in milli-CPUs. 
How is this number to interpret?

Looking at stats.c they compare the number with 1000 (times the number of 
cpus).

However, I have the following issue:

I wrote a daily script which sends me an email via a cron job. The mail 
contains this load value from /dev/sysstat.

When running the script like a normal shell script I get "reasonable" 
values (e.g. 147). Via cron in my mailbox I always read something close 
to 2000 (but always more than 1000).

Wouldn't it max out at 1000, since 1000 would be 100% cpu load? I don't 
understand the value properly, but that would make sense considering the 
details in stats.c.

And why is the value so different when running from a cron job? It's 
running on the same machine. However, rcpu to the same machine also makes 
a huge difference:

; cat /dev/sysstat
... 76 ...
; rcpu -h $sysname -c cat /dev/sysstat
... 512 ...

(The other numbers are very similar)

I don't understand it...

sirjofri

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-09 12:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 12:01 [9front] Understanding milli-CPUs (/dev/sysstat) sirjofri
2022-01-07 15:10 ` Benjamin Riefenstahl
2022-01-09  8:14   ` Anthony Martin
2022-01-09 12:36     ` Benjamin Riefenstahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).