Linux cgroups development
 help / color / mirror / Atom feed
From: "Víctor Fernández Martínez" <vfernandez-JE8hqn47KVKB+jHODAdFcQ@public.gmane.org>
To: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Getting notifications of the tasks file
Date: Tue, 31 Jul 2012 11:42:06 +0200	[thread overview]
Message-ID: <5486539.IgfTNnpt1m@valencia> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8-sig", Size: 2022 bytes --]

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?


Thanks.


Barracuda Networks AG
Vorsitzender des Aufsichtsrates/ Chairman of the supervisory board: Dean Drako
Vorstand/ Executive Board: Dr. Wieland Alge, Mag. Guenter Klausner
Sitz der Gesellschaft/ Registered office: 6020 Innsbruck, Austria
Handelsgericht Innsbruck Firmenbuch/ Registration Number: 184392s
UID-Nr/ VAT Number: ATU47509003

Diese Nachricht und allfaellige angehaengte Dokumente sind vertraulich und nur fuer den/die Adressaten bestimmt. Sollten Sie nicht der beabsichtigte Adressat sein, ist jede Offenlegung, Weiterleitung oder sonstige Verwendung dieser Information nicht gestattet. In diesem Fall bitten wir, den Absender zu verstaendigen und die Information zu vernichten. Fuer Uebermittlungsfehler oder sonstige Irrtuemer bei Uebermittlung besteht keine Haftung.

This message and any attached files are confidential and intended solely for the addressee(s). Any publication, transmission or other use of the information by a person or entity other than the intended addressee is prohibited. If you receive this in error please contact the sender and delete the material. The sender does not accept liability for any errors or omissions as a result of the transmission.


'Like' us on Facebook for exclusive content and other resources on all Barracuda Networks solutions.
Visit http://barracudanetworks.com/facebook


             reply	other threads:[~2012-07-31  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31  9:42 Víctor Fernández Martínez [this message]
2012-07-31 14:14 ` Getting notifications of the tasks file Kirill A. Shutemov
2012-08-07 11:33 ` Zhu Yanhai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5486539.IgfTNnpt1m@valencia \
    --to=vfernandez-je8hqn47kvkb+jhodadfcq@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox