Merge branch 'collectd-5.6' into collectd-5.7
authorPavel Rochnyack <pavel2000@ngs.ru>
Fri, 20 Oct 2017 13:54:09 +0000 (20:54 +0700)
committerPavel Rochnyack <pavel2000@ngs.ru>
Fri, 20 Oct 2017 13:54:09 +0000 (20:54 +0700)
src/collectd.conf.pod
src/memcached.c

index 0fe06d0..551169b 100644 (file)
@@ -6939,6 +6939,8 @@ Calculate and dispatch various values out of I<Timer> metrics received during
 an interval. If set to B<False>, the default, these values aren't calculated /
 dispatched.
 
+Please note what reported timer values less than 0.001 are ignored in all B<Timer*> reports.
+
 =back
 
 =head2 Plugin C<swap>
index 79c38a7..cfdf903 100644 (file)
@@ -341,9 +341,10 @@ static int memcached_read(user_data_t *user_data) {
      * CPU time consumed by the memcached process
      */
     if (FIELD_IS("rusage_user")) {
-      rusage_user = atoll(fields[2]);
+      /* Convert to useconds */
+      rusage_user = atof(fields[2]) * 1000000;
     } else if (FIELD_IS("rusage_system")) {
-      rusage_syst = atoll(fields[2]);
+      rusage_syst = atof(fields[2]) * 1000000;
     }
 
     /*