]> arthur.barton.de Git - netdata.git/commitdiff
use the last accumulated values when aggregating exited children to parents
authorCosta Tsaousis <costa@tsaousis.gr>
Fri, 1 Jul 2016 21:06:11 +0000 (00:06 +0300)
committerCosta Tsaousis <costa@tsaousis.gr>
Fri, 1 Jul 2016 21:06:11 +0000 (00:06 +0300)
src/apps_plugin.c

index ebc0b75c8b715cdf38800c39cd34e9bf62141721..bddf9dd049c0075e6b67b78ae5eeca071d73e54c 100644 (file)
@@ -1367,10 +1367,10 @@ void link_all_processes_to_their_parents(void) {
                                if(likely(pp)) {
                                        // this is an exited child with a parent
                                        // remove the known time from the parent's data
-                                       pp->fix_cminflt += p->minflt + p->cminflt + p->fix_cminflt;
-                                       pp->fix_cmajflt += p->majflt + p->cmajflt + p->fix_cmajflt;
-                                       pp->fix_cutime  += p->utime  + p->cutime  + p->fix_cutime;
-                                       pp->fix_cstime  += p->stime  + p->cstime  + p->fix_cstime;
+                                       pp->fix_cminflt += p->last_minflt + p->last_cminflt + p->last_fix_cminflt;
+                                       pp->fix_cmajflt += p->last_majflt + p->last_cmajflt + p->last_fix_cmajflt;
+                                       pp->fix_cutime  += p->last_utime  + p->last_cutime  + p->last_fix_cutime;
+                                       pp->fix_cstime  += p->last_stime  + p->last_cstime  + p->last_fix_cstime;
 
                                        if(unlikely(pp->cminflt < pp->fix_cminflt)) pp->fix_cminflt = pp->cminflt;
                                        if(unlikely(pp->cmajflt < pp->fix_cmajflt)) pp->fix_cmajflt = pp->cmajflt;