SUMMARY: Average Processor Load ?

From: Erik Williams <ewilliams_at_brownco.com>
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
you:

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

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

main()
{
        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
Nathan
Chris Hoogendyk
Charles Rawls
tony bourke
dana
Mike Salehi
Tim Chipman
Sean Berry
John T. Douglass
Jim Campbell
Fabrice Guerini
Jay Lessert
McCaffity, Ray
mike.marcell
TRUCKS, JESSE
Marcus Groff
Kerekes, Ed
Jed Dobson
Selimaj, Naxhije
Vandevegt, James Matthew
German, Vinnie
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
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