SUMMARY: Average Processor Load ?

From: Erik Williams <>
Date: Tue Jul 16 2002 - 10:14:45 EDT
Thanks for all the responses. The answer is uptime or w.

There was one particularly interesting response from Jesse Trucks ->

If you are looking for JUST the load averages, you have to compile your own
program to do so. The following code will work on a Solaris 8 system for

#include <stdio.h>
#include <sys/loadavg.h>

int getloadavg(double loadavg[], int nelem);

        int nelem = 3;
        double avg[3];
        getloadavg(avg, 3);
        printf("%.2f %.2f %.2f\n", avg[0], avg[1], avg[2]);

Thanks to:
Jeff Lucas
John Riddoch
Steudten Thomas
Sreenivasa Rao Vadalasetty
Vahid Moghaddasi
Ben Green
McEwan, Ryan
Michael Schulte
Dirk Bvnning
Chris Hoogendyk
Charles Rawls
tony bourke
Mike Salehi
Tim Chipman
Sean Berry
John T. Douglass
Jim Campbell
Fabrice Guerini
Jay Lessert
McCaffity, Ray
Marcus Groff
Kerekes, Ed
Jed Dobson
Selimaj, Naxhije
Vandevegt, James Matthew
German, Vinnie
sunmanagers mailing list
Received on Tue Jul 16 10:26:55 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:49 EST