Subject: resource usage funnies
To: None <port-pmax@NetBSD.ORG>
From: Simon Burge <>
List: port-pmax
Date: 06/26/1996 14:52:25
Another thing I've just noticed is that CPU time usage seems a bit
funny.  Every now and then I see very-large resource usage.  Below is
the output of a little CPU time waster.  mona is a NetBSD/pmax -current
box, and shelob is NetBSD/i386 -current from about 2 weeks ago.  I've
never seen the problem on the i386, although I don't use it every

mona:~ 102> time ./burn 50
382.351u 3962.609s 0:50.00 8689.9% 0+0k 0+0io 0pf+0w
mona:~ 103> time ./burn 50
4.963u 44.721s 0:50.00 99.3% 0+0k 0+0io 2pf+0w

shelob:~ 30> time ./burn 50
10.522u 39.333s 0:50.02 99.6% 0+0k 0+0io 10pf+0w

I remember some patches about overflows for some kernel resource
counters, but I didn't think that would be a concern for values less
than 4000-odd seconds (4000 ~ 2^32 microseconds).

Ideas anyone?


/* burn.c */

#include <signal.h>


main(argc, argv)
	int	argc;
	char	**argv;
	int	i;

	if (argc > 1 && ((i = atoi(argv[1])) > 0))
		signal(SIGALRM, quit), alarm(i);
	while (1)
		close(3);  /* Comment out for user-time */