@cryptotaxi247 / netdata-1 / commits / 88bba2bd6

use the last accumulated values when aggregating exited children to parents

Costa Tsaousis committed Jul 2, 2016 at 00:06 UTC 88bba2bd669f3fd687dfabe48fa7a904edb8fa8d
1 file changed +4 -4
src/apps_plugin.c
+4 -4
@@ -1367,10 +1367,10 @@ void link_all_processes_to_their_parents(void) {
1367 if(likely(pp)) {
1368 // this is an exited child with a parent
1369 // remove the known time from the parent's data
1370 - pp->fix_cminflt += p->minflt + p->cminflt + p->fix_cminflt;
1371 - pp->fix_cmajflt += p->majflt + p->cmajflt + p->fix_cmajflt;
1372 - pp->fix_cutime += p->utime + p->cutime + p->fix_cutime;
1373 - pp->fix_cstime += p->stime + p->cstime + p->fix_cstime;
1370 + pp->fix_cminflt += p->last_minflt + p->last_cminflt + p->last_fix_cminflt;
1371 + pp->fix_cmajflt += p->last_majflt + p->last_cmajflt + p->last_fix_cmajflt;
1372 + pp->fix_cutime += p->last_utime + p->last_cutime + p->last_fix_cutime;
1373 + pp->fix_cstime += p->last_stime + p->last_cstime + p->last_fix_cstime;
1374
1375 if(unlikely(pp->cminflt < pp->fix_cminflt)) pp->fix_cminflt = pp->cminflt;
1376 if(unlikely(pp->cmajflt < pp->fix_cmajflt)) pp->fix_cmajflt = pp->cmajflt;