X-Git-Url: https://git.wpitchoune.net/gitweb/?p=psensor.git;a=blobdiff_plain;f=src%2Flib%2Fpgtop2.c;h=ff0e28df835cbebc71e47c5e058f657911b626d6;hp=5e57d5fbee44647ae7d4e5a6b2ede1b0f73c0bea;hb=c1e20f2631a1249720e9c75d753eacfcb0f6c7b9;hpb=b352229bd4526b1193080397ebb8136420d33c7e diff --git a/src/lib/pgtop2.c b/src/lib/pgtop2.c index 5e57d5f..ff0e28d 100644 --- a/src/lib/pgtop2.c +++ b/src/lib/pgtop2.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2014 jeanfi@gmail.com + * Copyright (C) 2010-2016 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -66,7 +66,7 @@ static struct psensor *create_mem_free_sensor(int measures_len) measures_len); } -static double get_usage() +static double get_usage(void) { glibtop_cpu cpu; unsigned long int used, dt; @@ -89,7 +89,7 @@ static double get_usage() return cpu_rate; } -static double get_mem_free() +static double get_mem_free(void) { glibtop_mem mem; double v; @@ -116,7 +116,7 @@ void cpu_usage_sensor_update(struct psensor *s) psensor_set_current_value(s, v); } -void mem_free_sensor_update(struct psensor *s) +static void mem_free_sensor_update(struct psensor *s) { double v; @@ -133,7 +133,8 @@ void gtop2_psensor_list_update(struct psensor **sensors) while (*sensors) { s = *sensors; - if (s->type & SENSOR_TYPE_GTOP) { + if (!(s->type & SENSOR_TYPE_REMOTE) + && s->type & SENSOR_TYPE_GTOP) { if (s->type & SENSOR_TYPE_CPU) cpu_usage_sensor_update(s); else if (s->type & SENSOR_TYPE_MEMORY)