#include #include #include "process.h" #include "draw_graphs.h" #include "parser.h" #include "scheduler.h" #include "testdata.h" int main(int argc, char *argv[]) { struct rrd_database *db; int sleeptime; while (1) { printf("%d: loop start\n", getpid()); /* * Update all databases parallel in one shot */ while ((db = check_update_need(&all_rrds))) update_data(db); /* * Let the updates finish */ if (harvest_zombies(0)) continue; sleeptime = get_next_update(&all_rrds); printf("Time to sleep %d seconds\n", sleeptime); sleep(sleeptime); } return 0; }