[collectd] Monitor CPU usage for a specific process

Zhou, Zhenyu zzyzzy at pku.org.cn
Sat Aug 22 15:36:48 CEST 2015

Thanks a lot! I'm trying to figure out how to set CGroup now - don't know it before.

One more question, I just find /proc/[PID]/stat also contains such information:
processCPUTime = utime + stime + cutime + cstime

I'm wondering whether there are any significant differences from reading /proc directly and the way Collectd used?

Thank you!


At2015-08-22 20:32:29,Zhou, Zhenyu<zzyzzy at pku.org.cn>wrote:
> 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