Issue 490 in psutil: Expose cgroup as process attr

25 views
Skip to first unread message

psu...@googlecode.com

unread,
Mar 29, 2014, 11:12:49 PM3/29/14
to psutil-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 490 by kap...@gmail.com: Expose cgroup as process attr
http://code.google.com/p/psutil/issues/detail?id=490

On linux, cgroup usage is increasingly common (systemd, lxc, docker), it
would be nice to have that exposed on a process as an attribute.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

psu...@googlecode.com

unread,
Apr 7, 2014, 12:29:02 PM4/7/14
to psutil-...@googlegroups.com
Updates:
Labels: OpSys-Linux

Comment #1 on issue 490 by g.rodola: Expose cgroup as process attr
http://code.google.com/p/psutil/issues/detail?id=490

I've been meaning to look into this for a while now but I've never really
had the chance to look into how Linux cgroups work and how to configure
them on a per-process basis (yet).
It must be noted that Process.rlimit() was introduced as some kind of
substitute for Linux cgroups as it allows to configure many aspects of the
process execution with a clean(er) API:
http://psutil.readthedocs.org/en/latest/#psutil.Process.rlimit
If there's one thing I understood from Linux cgroups is that it's not
immediately clear how to configure them, therefore it's also not clear what
kind of API we should expose.
I'm kind of a newbie here so any kind of suggestion is appreciated.

psu...@googlecode.com

unread,
Apr 7, 2014, 12:54:54 PM4/7/14
to psutil-...@googlegroups.com

Comment #2 on issue 490 by kap...@gmail.com: Expose cgroup as process attr
http://code.google.com/p/psutil/issues/detail?id=490

so configuring cgroups i think is probably out of scope, things there are
still in a bit of flux (direct sys fs mods to arbiter either in the form of
cgmanager or systemd accessed via debus).

exposing the details of a process's cgroup those is relative
straightforward though
http://blog.docker.io/2013/10/gathering-lxc-docker-containers-metrics/

ideally to me is filter on querying processes by cgroup name, with each
process obj having a link/attr to its cgroup which is an object that
exposes the overall cgroup stats (mem, cpu usage, etc) which makes
collecting container/process group stats trivial.

psu...@googlecode.com

unread,
May 26, 2014, 11:09:04 AM5/26/14
to psutil-...@googlegroups.com

Comment #3 on issue 490 by g.rodola: Expose cgroup as process attr
http://code.google.com/p/psutil/issues/detail?id=490

psutil has been migrated from Google Code to Github (see:
http://grodola.blogspot.com/2014/05/goodbye-google-code-im-moving-to-github.html).
Please do NOT reply here but use this instead:
https://github.com/giampaolo/psutil/issues/490
Reply all
Reply to author
Forward
0 new messages