Subject: Re: NetBSD-1.4: strange system load reports
To: None <port-i386@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-i386
Date: 06/14/1999 23:39:16
>> However, your statement of "idle with no major activity" makes me
>> think you're not expecting to see any...
> Acroread under the linux emulator on the i386 port will bump the load
> average by 1. Interestingly acroread also uses 0.01 seconds of cpu /
> 2 seconds when idle. The latter is observable with "watch ps -xl".
I've seen this sort of behavior often enough myself, and it's not
hardware-specific. Try the following program as an example.
#include <signal.h>
#include <sys/time.h>
#include <sys/sysctl.h>
static void handler(int sig __attribute__((__unused__)))
{
}
int main(void);
int main(void)
{
struct clockinfo ci;
int cilen;
int mib[2];
struct itimerval itv;
signal(SIGALRM,handler);
mib[0] = CTL_KERN;
mib[1] = KERN_CLOCKRATE;
cilen = sizeof(ci);
sysctl(&mib[0],2,&ci,&cilen,0,0);
itv.it_value.tv_sec = ci.tick / 1000000;
itv.it_value.tv_usec = ci.tick % 1000000;
itv.it_interval = itv.it_value;
setitimer(ITIMER_REAL,&itv,0);
while (1) sigpause(0);
}
der Mouse
mouse@rodents.montreal.qc.ca
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B