@cryptotaxi247 / netdata-1 / commits / f3a663b91

apps.plugin restarts every hour

Costa Tsaousis (ktsaou) committed Jun 1, 2014 at 22:07 UTC f3a663b91119e135ec066e97529e1e89825bcca5
1 file changed +4
apps_plugin.c
+4
@@ -1642,6 +1642,7 @@ void parse_args(int argc, char **argv)
1642
1643 int main(int argc, char **argv)
1644 {
1645 + unsigned long started_t = time(NULL), current_t;
1646 Hertz = get_hertz();
1647 pid_max = get_pid_max();
1648 processors = get_processors();
@@ -1685,5 +1686,8 @@ int main(int argc, char **argv)
1686
1687 usleep(susec);
1688 bcopy(&now, &last, sizeof(struct timeval));
1689 +
1690 + current_t = time(NULL);
1691 + if(current_t - started_t > 3600) exit(0);
1692 }
1693 }