/* * essai.c */ #include #include #include #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; } /* --------------------------------------------------------------- */