From: Florian Forster Date: Fri, 29 Sep 2017 14:24:31 +0000 (+0200) Subject: processes plugin: Format with clang-format. X-Git-Tag: collectd-5.8.0~62^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c0e8b0392fed8ee776db4942af52be4d4b83069d;p=collectd.git processes plugin: Format with clang-format. Also a small manpage formatting tweak. --- diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod index f82cd236..b392baa3 100644 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@ -6732,8 +6732,8 @@ Collect context switch of the process. =item B I Collect the number of memory mapped files of the process. -The limit for this number is configured via /proc/sys/vm/max_map_count in the -linux kernel. +The limit for this number is configured via F in +the Linux kernel. =back diff --git a/src/processes.c b/src/processes.c index 0984d7f6..89cf3e0e 100644 --- a/src/processes.c +++ b/src/processes.c @@ -804,20 +804,22 @@ static void ps_submit_proc_list(procstat_t *ps) { plugin_dispatch_values(&vl); } - DEBUG("name = %s; num_proc = %lu; num_lwp = %lu; num_fd = %lu; num_maps = %lu; " - "vmem_size = %lu; vmem_rss = %lu; vmem_data = %lu; " - "vmem_code = %lu; " - "vmem_minflt_counter = %" PRIi64 "; vmem_majflt_counter = %" PRIi64 "; " - "cpu_user_counter = %" PRIi64 "; cpu_system_counter = %" PRIi64 "; " - "io_rchar = %" PRIi64 "; io_wchar = %" PRIi64 "; " - "io_syscr = %" PRIi64 "; io_syscw = %" PRIi64 "; " - "io_diskr = %" PRIi64 "; io_diskw = %" PRIi64 "; " - "cswitch_vol = %" PRIi64 "; cswitch_invol = %" PRIi64 ";", - ps->name, ps->num_proc, ps->num_lwp, ps->num_fd, ps->num_maps, ps->vmem_size, - ps->vmem_rss, ps->vmem_data, ps->vmem_code, ps->vmem_minflt_counter, - ps->vmem_majflt_counter, ps->cpu_user_counter, ps->cpu_system_counter, - ps->io_rchar, ps->io_wchar, ps->io_syscr, ps->io_syscw, ps->io_diskr, - ps->io_diskw, ps->cswitch_vol, ps->cswitch_invol); + DEBUG( + "name = %s; num_proc = %lu; num_lwp = %lu; num_fd = %lu; num_maps = %lu; " + "vmem_size = %lu; vmem_rss = %lu; vmem_data = %lu; " + "vmem_code = %lu; " + "vmem_minflt_counter = %" PRIi64 "; vmem_majflt_counter = %" PRIi64 "; " + "cpu_user_counter = %" PRIi64 "; cpu_system_counter = %" PRIi64 "; " + "io_rchar = %" PRIi64 "; io_wchar = %" PRIi64 "; " + "io_syscr = %" PRIi64 "; io_syscw = %" PRIi64 "; " + "io_diskr = %" PRIi64 "; io_diskw = %" PRIi64 "; " + "cswitch_vol = %" PRIi64 "; cswitch_invol = %" PRIi64 ";", + ps->name, ps->num_proc, ps->num_lwp, ps->num_fd, ps->num_maps, + ps->vmem_size, ps->vmem_rss, ps->vmem_data, ps->vmem_code, + ps->vmem_minflt_counter, ps->vmem_majflt_counter, ps->cpu_user_counter, + ps->cpu_system_counter, ps->io_rchar, ps->io_wchar, ps->io_syscr, + ps->io_syscw, ps->io_diskr, ps->io_diskw, ps->cswitch_vol, + ps->cswitch_invol); } /* void ps_submit_proc_list */ @@ -1041,7 +1043,7 @@ static int ps_count_maps(pid_t pid) { while (fgets(buffer, sizeof(buffer), fh) != NULL) { if (strchr(buffer, '\n')) { - count ++; + count++; } } /* while (fgets) */