Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!wuarchive!uunet!husc6!encore!pinocchio.encore.com!jludwig From: jludwig@pinocchio.encore.com (Jim Ludwig) Newsgroups: comp.sys.encore Subject: Re: xload for UMAX BSD Message-ID: <12849@encore.Encore.COM> Date: 2 Oct 90 21:28:37 GMT Sender: news@Encore.COM Reply-To: jludwig@pinocchio.encore.com (Jim Ludwig) Organization: Encore Computer Corp. Lines: 51 Here goes: add to the include section: #include #include static struct proc_summary Proc_sum_data; static struct stat_descr Proc_info = { NULL, SUBSYS_PROC, PROCTYPE_SUMMARY, 0, 0, (char *) &Proc_sum_data, sizeof (struct proc_summary), 0, 0}; add to GetLoadPoint: int i, j; double sum = 0; if (inq_stats (1, &Proc_info) != 0) { perror ("xload"); exit (-1); } for (i = Proc_sum_data.ps_nrunidx, j = 0; j < 12; j++) { sum += Proc_sum_data.ps_nrun[i]; if (--i < 0) i = PS_NRUNSIZE - 1; } *loadavg = sum / 12; return; Program must be with group bin and setgid -rwxr-sr-x 1 root bin Enjoy. This code is supplied without warrenty and Encore makes no promises, but it does seem to work :-) Jim Ludwig X Development Manager Encore Computer jludwig@encore.com