processes plugin: Fix check for context switch counters.
authorFlorian Forster <octo@collectd.org>
Fri, 17 Nov 2017 16:11:32 +0000 (17:11 +0100)
committerFlorian Forster <octo@collectd.org>
Fri, 17 Nov 2017 16:11:32 +0000 (17:11 +0100)
CID: 179230

src/processes.c

index 89cf3e0..f556912 100644 (file)
@@ -502,7 +502,7 @@ static void ps_list_add(const char *name, const char *cmdline,
       ps_update_counter(&ps->io_diskw, &pse->io_diskw, entry->io_diskw);
     }
 
-    if ((entry->cswitch_vol != -1) && (entry->cswitch_vol != -1)) {
+    if ((entry->cswitch_vol != -1) && (entry->cswitch_invol != -1)) {
       ps_update_counter(&ps->cswitch_vol, &pse->cswitch_vol,
                         entry->cswitch_vol);
       ps_update_counter(&ps->cswitch_invol, &pse->cswitch_invol,