michel@ele.tue.nl (& Berkelaar) (05/28/90)
To get the system load in the mode line while using gnuemacs on an apollo
workstation (which does not have a /dev/kmem), we inserted the following few
lines in loadst.c (at line 224):
#ifdef APOLLO
{
long tmpbuf[3];
proc1_$get_loadav(tmpbuf);
printf("%.2f", tmpbuf[0]/(float) (1 << 16));
}
#endif /* APOLLO */
The call to proc1_$get_loadav is undocumented, but using it in this way
produces exactly the same results as 'uptime' reports. We tested it on
Apollo DN3000 and DN2500 workstations running OS 10.2, but I suppose it will
work on any Apollo machine.
Perhaps some authorative person at MIT might consider putting this in the
official GNUemacs release (18.56???).
--
-------------------------------------------------------------------------------
Michel Berkelaar | Email: michel@ele.tue.nl
Eindhoven University of Technology |
Dept. of Electrical Engineering |
Design Automation Section |
P.O. Box 513 | Phone: ... - 31 - 40 - 473345
NL-5600 MB Eindhoven | Fax: ... - 31 - 40 - 448375
The Netherlands |
-------------------------------------------------------------------------------