Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!tut.cis.ohio-state.edu!ucbvax!shum.UUCP!amoss From: amoss@shum.UUCP (Amos Shapira) Newsgroups: comp.sys.sgi Subject: How to get avenrun (or: how to read vars from kmem) Message-ID: Date: 22 Nov 90 13:23:30 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: comp Lines: 24 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@batata.huji.ac.il. Thanks in advance, Amos Shapira amoss@batata.huji.ac.il