ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/host/sysinfo/load.cc
(Generate patch)

Comparing experimental/host/sysinfo/load.cc (file contents):
Revision 1.1 by tdb, Tue Nov 7 02:26:03 2000 UTC vs.
Revision 1.2 by tdb, Tue Nov 7 17:55:08 2000 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines