]> arthur.barton.de Git - netdata.git/commitdiff
debug for negative number of threads
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 29 Mar 2015 23:19:19 +0000 (02:19 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 29 Mar 2015 23:19:19 +0000 (02:19 +0300)
src/plugins.d/apps_plugin.c

index 02c974edf5f9acb500f35bd52eb97bf7201f9c0e..049451a176196a29daab85d82cf2c9e2e2989a6e 100755 (executable)
@@ -1375,6 +1375,9 @@ void update_statistics(void)
                        p->target->minflt += p->minflt; //+ (p->pid != 1)?(p->cminflt - p->fix_cminflt):0;
                        p->target->majflt += p->majflt; //+ (p->pid != 1)?(p->cmajflt - p->fix_cmajflt):0;
 
+                       if(p->num_threads < 0)
+                               error("Negative threads number for pid '%s': %d", p->comm, p->num_threads);
+
                        p->target->num_threads += p->num_threads;
                        p->target->rss += p->rss;