* average load statistics on DS300?
@ 1990-03-02 20:09 Robert Macomber
1990-03-03 0:13 ` Alan's Home for Wayward Notes File.
0 siblings, 1 reply; 4+ messages in thread
From: Robert Macomber @ 1990-03-02 20:09 UTC (permalink / raw)
I'm having trouble extracting average load statistics on a DS3100.
It's a loaner machine running ULTRIX (version 3.0, I think).
I've tried compiling the "stats" remote statistics server and the "top"
performance monitor, but both come up with zero values for the avenrun
variables. There must be some way, because "xload" seems to work
okay.
If some kind soul knows the answer (or better yet has a working version
of rstatd) I'd be grateful to learn about it.
Thanks in Advance.
--
Robert L. Macomber
National Semiconductor
South Portland, Maine
macomber@thoreau.nsc.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: average load statistics on DS300?
1990-03-02 20:09 average load statistics on DS300? Robert Macomber
@ 1990-03-03 0:13 ` Alan's Home for Wayward Notes File.
1990-03-03 17:19 ` Brain in Neutral
1990-03-07 0:55 ` Mark Litwack
0 siblings, 2 replies; 4+ messages in thread
From: Alan's Home for Wayward Notes File. @ 1990-03-03 0:13 UTC (permalink / raw)
In article <33@thoreau.nsc.com>, macomber@thoreau.nsc.com (Robert Macomber) writes:
>
> I'm having trouble extracting average load statistics on a DS3100.
> It's a loaner machine running ULTRIX (version 3.0, I think).
> I've tried compiling the "stats" remote statistics server and the "top"
> performance monitor, but both come up with zero values for the avenrun
> variables. There must be some way, because "xload" seems to work
> okay.
The load average is stored in a data structure called
"avenrun" (you probably already know this). On a VAX
system type of avenrun is double. On the DECstation it
is type "fix". There is an include file you'll be interested
in called <sys/fixpoint.h>. To convert fix to double use
FIX_TO_DBL().
>
> Thanks in Advance.
You're welcome.
> --
> Robert L. Macomber
--
Alan Rollow alan@nabeth.enet.dec.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: average load statistics on DS300?
1990-03-03 0:13 ` Alan's Home for Wayward Notes File.
@ 1990-03-03 17:19 ` Brain in Neutral
1990-03-07 0:55 ` Mark Litwack
1 sibling, 0 replies; 4+ messages in thread
From: Brain in Neutral @ 1990-03-03 17:19 UTC (permalink / raw)
Something I have used to get load average out of a MIPS M/120. Might
be useful on a DECstation as well... strip out the irrelevant junk...
/*
RISC/os 4.0 version
xloadback - back end for xload for machines with no X server.
Just sends load average to stdout every now and then. Should
attach over network to xloadfront process on machine with X
server that reads it and displays it a la regular xload.
Sends the load*100 as a 32-bit quantity in network byte order.
12 July 1989 Paul DuBois dubois@rhesus.primate.wisc.edu
*/
# include <stdio.h>
# include <nlist.h>
# include <sys/fixpoint.h>
# include <sys/file.h>
# define UNIX "/unix"
# define KMEM_FILE "/dev/kmem"
# define KMEM_ERROR "cannot open /dev/kmem"
# define LOADAV 0
struct nlist namelist[] = { /* namelist for vmunix grubbing */
{"avenrun"},
{0}
};
char hostname[256];
main ()
{
register int kmem; /* kmem pointer */
long lavgSeek; /* offset to load average in kmem */
ufix tmpLoad; /* system load info */
long iLoad;
if (gethostname (hostname, sizeof (hostname)))
smerror ("don't know hostname");
/* Get name list. Then open kmem so we can seek for information */
nlist(UNIX, namelist);
if (namelist[LOADAV].n_type == 0)
smerror("cannot get name list");
lavgSeek = namelist[LOADAV].n_value;
kmem = open(KMEM_FILE, O_RDONLY);
if (kmem < 0)
smerror(KMEM_ERROR);
write (1, hostname, strlen (hostname) + 1);
for (;;)
{
sleep (5);
lseek(kmem, lavgSeek, 0);
read(kmem, (char *) &tmpLoad, sizeof (tmpLoad));
iLoad = (long) (FIX_TO_DBL (tmpLoad) * 100.0);
iLoad = htonl (iLoad);
printf ("%d %d %g\n", iLoad, ntohl (iLoad), FIX_TO_DBL (tmpLoad));
/*write(1, (char *) &iLoad, sizeof (iLoad));*/
fflush (stdout);
}
}
/* Diagnostic printer - Print message and exit */
smerror(message)
char *message;
{
fprintf (stderr, "%s\n", message);
exit(1);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: average load statistics on DS300?
1990-03-03 0:13 ` Alan's Home for Wayward Notes File.
1990-03-03 17:19 ` Brain in Neutral
@ 1990-03-07 0:55 ` Mark Litwack
1 sibling, 0 replies; 4+ messages in thread
From: Mark Litwack @ 1990-03-07 0:55 UTC (permalink / raw)
jim@mango.miami.edu (jim brown) just posted patches for top
on comp.sources.bugs that fixes the problems on the DS3100.
-mark
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1990-03-07 0:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1990-03-02 20:09 average load statistics on DS300? Robert Macomber
1990-03-03 0:13 ` Alan's Home for Wayward Notes File.
1990-03-03 17:19 ` Brain in Neutral
1990-03-07 0:55 ` Mark Litwack
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox