1234567891011121314151617181920212223242526272829303132333435363738 |
- /*
- * essai.c
- */
-
- #include <stdio.h>
- #include <unistd.h>
- #include <stdlib.h>
-
- #include "funcs.h"
-
- int verbosity;
-
- /* --------------------------------------------------------------- */
-
- int main(int argc, char *argv[])
- {
- int opt, foo;
- int type = 0;
- double loads[3];
-
- while ((opt = getopt(argc, argv, "vst:")) != -1) {
- switch (opt) {
- case 'v': verbosity++; break;
- case 's': srand(getpid()); break;
- case 't': type = atoi(optarg); break;
- default: break;
- }
- }
-
- foo = get_loadavg(loads);
- if (foo) fprintf(stderr, "get loadavg -> %d\n", foo);
-
- printf("%f %f %f %f\n", dtime(), loads[0], loads[1], loads[2]);
-
- return 0;
- }
-
- /* --------------------------------------------------------------- */
|