]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
processes: fix prints & remove useless comments
authortiozhang <zyhtheonly@yeah.net>
Sat, 6 May 2023 03:12:28 +0000 (11:12 +0800)
committerMatthias Runge <mrunge@matthias-runge.de>
Mon, 22 May 2023 16:49:12 +0000 (18:49 +0200)
Signed-off-by: tiozhang <zyhtheonly@yeah.net>
Signed-off-by: luffysong <zsfz_one@163.com>
src/processes.c

index 561c134fc3754d037b300b6cf925985b6d7801d8..0e38a420f53c2471bd992aa0fc64024cb87b4227 100644 (file)
@@ -977,10 +977,7 @@ static void ps_submit_proc_list(procstat_t *ps) {
 } /* void ps_submit_proc_list */
 
 #if KERNEL_LINUX || KERNEL_SOLARIS
-static void ps_submit_global_stat(
-    const char *type_name,
-    derive_t value) { // change: ps_submit_fork_rate -> ps_submit_global_stat.
-                      // In addtion, add a argument: char* type_name.
+static void ps_submit_global_stat(const char *type_name, derive_t value) {
   value_list_t vl = VALUE_LIST_INIT;
 
   vl.values = &(value_t){.derive = value};
@@ -1469,7 +1466,7 @@ static int procs_running(const char *buffer) {
    */
   running = strstr(buffer, id);
   if (!running) {
-    WARNING("'processes ' not found in /proc/stat");
+    WARNING("'procs_running ' not found in /proc/stat");
     return -1;
   }
   running += strlen(id);