[comp.unix.questions] Getting the current load average

nash@ucselx.sdsu.edu (Ron Nash) (02/08/90)

I am trying to get the load average code in nntpd (Cnews/Bnews) to run 
right on my system (Elxsi 6400 running a BSD 4.3 port).  The code is
the last subroutine, getla(), in server/misc.c.  The subroutine always
exits with "-1" for the load average.  

		kmem = open("/dev/kmem", 0, 0);
		if (kmem < 0)
			return (-1);
		(void) ioctl(kmem, (int) FIOCLEX, (char *) 0);
		nlist("/vmunix", Nl);
		/* The following statements exits: */
		if (Nl[X_AVENRUN].n_type == 0)
			return (-1);

Can someone help me understand what I should be looking for to fix this?

If some had a routine they think might work, post or email and I will
try it.  Thanks in advance!


-- 
Ron Nash
San Diego State University
Internet:  nash@ucselx.sdsu.edu
UUCP:      ucsd!sdsu!ucselx!nash