Hi Lukas, On Sun, Sep 04, 2011 at 09:29:31AM +0200, Lukas Bednar wrote: > But there is problem that these specific processes execute another > processes (children) which generate considerable load. These > child-processes isn't counted to statistic data of specific process.
as far as I know, there is no such functionality yet in collectd. > So we would like improve this plugin with ProcessTree and > ProcessMatchTree option. IIrc, there's a place in the processes plugin doing basically: for pid for configured_process if pid matches configured_process do_acounting (pid, configured_process) I think rather than building a real process tree, I'd do something like this: for pid for configured_process cur_pid = pid while cur_pid != ppid(cur_pid) if cur_pid matches configured_process do_acounting (pid, configured_process) break else cur_pid = ppid(cur_pid) Since normal "options" are just blocks without any children in collectd's config, I'd propose to use the following alternative config syntax: <Plugin processes> <Process "my_parent"> AccountChildren true|false|<num> </Process> </Plugin> Where: * true: Account all children (in code: check PPID until we reach init) * false: Don't account any children (in code: never check PPID; default to preserve backwards compatibility) * <num>: Account <num> levels of children. "true" would be the same as infinity / 65536, "false" would be the same as 0. Best regards, —octo -- Florian octo Forster Hacker in training GnuPG: 0x0C705A15 http://octo.it/
signature.asc
Description: Digital signature
_______________________________________________ collectd mailing list collectd@verplant.org http://mailman.verplant.org/listinfo/collectd