How to get avenrun (or: how to read vars from kmem)

Amos Shapira amoss at shum.UUCP
Fri Nov 23 00:23:30 AEST 1990


Hello,
 I need to write a program which will get the load avarage (to port
 a batch system).

 I call nlist(3) and get the right offset (compared to nm(1) output)
 but when trying to lseek(2) to the place I get an "Invalid argument"
 error (and no seek is done).

 According to the manual, the problem is that lseek will not allow
 a negative result on file descriptors which are not "remote file
 descriptors" (what is it?). (lseek(2), Version 4.0, July 1989).

 The file descriptor, which could be a cause for the same kind
 of error code, is O.K., since the read(2) I do doesn't complain
 about it.

 My system is an Iris 4D/240GTX running Irix 3.3.1.

 Please reply by e-mail (or at least send a copy of the reply) to
 amoss at batata.huji.ac.il.

Thanks in advance,
Amos Shapira
amoss at batata.huji.ac.il



More information about the Comp.sys.sgi mailing list