#include "uptime.h"
#include "util.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(int argc, char **argv)
{
  double avg;
  int c, mult = 1;
  loadavg(0, &avg, 0);

  while ((c = getopt(argc, argv, "m:")) > 0) {
    switch (c) {
      case 'm': mult = atoi(optarg); break;
      default:
	fprintf(stderr, "Usage: mrtg-load [-m multiplier]\n");
	return(0);
    }
  }
  
  printf("0\n%.0f\n", avg*mult);
  print_uptime();
  print_hostname();
  return 0;
}
