ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/host/sysinfo/load.cc
Revision: 1.1
Committed: Tue Nov 7 02:26:03 2000 UTC (23 years, 8 months ago) by tdb
Branch: MAIN
Log Message:
Experimental program to acquire the 3 load values on Solaris.

File Contents

# User Rev Content
1 tdb 1.1 #include <iostream.h>
2     #include <sys/loadavg.h>
3    
4     int main() {
5     double loadavg[3];
6    
7     int res = getloadavg(loadavg, 3);
8    
9     cout << "Load average over the last ..." << endl;
10     cout << "... 1 minute: " << loadavg[0] << endl;
11     cout << "... 5 minutes: " << loadavg[1] << endl;
12     cout << "... 15 minutes: " << loadavg[2] << endl;
13    
14     return 0;
15     }