Revision: | 1.1 |
Committed: | Tue Nov 7 02:26:03 2000 UTC (24 years ago) by tdb |
Branch: | MAIN |
Log Message: | Experimental program to acquire the 3 load values on Solaris. |
# | Content |
---|---|
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 | } |