[collectd] Monitor CPU usage for a specific process

Bruno Prémont bonbons at linux-vserver.org
Sat Aug 22 14:32:29 CEST 2015


Hello,

On Sat, 22 Aug 2015 20:10:25 "Zhou, Zhenyu" wrote:
> I'm new to Collectd and would like to use it to measure CPU utilization.
> However, after starting the daemon and collecting results, I do not
> find CPU utilization for a single process among the .rrd files. I only
> find the data for overall system.
> 
> Does anyone have idea how to measure it for one process (according to
> its PID)? Or does Collectd support such functionality?

The CPU plugin can only monitor per-CPU usage (and eventually a system
average).

To monitor per-process usage you might be able to use process plugin
(not sure) or cgroups (place the process you want to monitor in its own
cgroup for CPU accounting and use cgroup plugin).

Bruno



More information about the collectd mailing list