On Tue, Jul 31, 2012 at 11:42:06AM +0200, Víctor Fernández Martínez wrote: > I'm trying to use the eventfd notification API to get notified when the tasks > file changes. This way I would like to know when child processes are spawned > and when they exit. However, I always get EINVAL when writing to > cgroup.event_control. Even cgroup_event_listener.c returns that error: > > # cat /sys/fs/cgroup/memory/grp0/tasks > 3590 > 23902 > # ./cgroup_event_listener /sys/fs/cgroup/memory/grp0/tasks 0 > Cannot write to cgroup.event_control: Invalid argument > > I have also tried to monitor cgroup.procs. > > Is it possible to monitor the tasks file at all or is this a bug? If 0 is a > wrong argument, which argument should I use instead? Currently, you can only listen for events from memory.usage_in_bytes, memory.memsw.usage_in_bytes and memory.oom_control. It's not implemented for any other cgroup files yet. -- Kirill A. Shutemov -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html