Bug 600404 - RFE: add command to list groups and show attributes of group
Summary: RFE: add command to list groups and show attributes of group
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libcgroup (Show other bugs)
(Show other bugs)
Version: 6.0
Hardware: All Linux
low
medium
Target Milestone: rc
: ---
Assignee: Ivana Varekova
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Keywords: FutureFeature
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-04 16:12 UTC by Kirby Zhou
Modified: 2010-06-07 08:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-07 07:54:48 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Kirby Zhou 2010-06-04 16:12:50 UTC
RFE: add command to list groups and show attributes of group

We can use cgcreate to create group, cgset to modify group, but no commands can tell us the list of alredy created groups nor the attributes of a group. So we have to check the /cgroup directory manually.

So, commands like 'cggrps', 'cgshow' is suggested.

cggrps list the cgroup of specified controller. for example:
]# cggrps -g cpu:/test
cpu:/test/
cpu:/test/a
...
]# cglist
cpu:/
cpu:/test/
cpu:/test/a
cpuacct:/
...

cggrps can also tell us which groups a pid stay in.
]# cppgrps -p 12131
cpu:/test/a
cpuacct:/
...
]# cppgrps -p 12131 -g cpu
/test/a

cgshow show us the attributes of a group. for example:
]# cgshow cpu:/test
cpu.rt_runtime_us=950000
...

Comment 2 Jan Safranek 2010-06-07 07:33:10 UTC
There already are some tools to satisfy your needs:

(In reply to comment #0)
> cggrps list the cgroup of specified controller. for example:
> ]# cggrps -g cpu:/test
> cpu:/test/
> cpu:/test/a

Use lscgroup

> cggrps can also tell us which groups a pid stay in.
> ]# cppgrps -p 12131

This is not yet implemented in any libcgroup tool... use cat /proc/12131/cgroup

> cgshow show us the attributes of a group. for example:
> ]# cgshow cpu:/test
> cpu.rt_runtime_us=950000

use cgget -g cpu /test

Comment 3 Kirby Zhou 2010-06-07 07:48:25 UTC
there is no lscgroup nor cgget in libcgroup-0.34-4.el6.x86_64

Comment 4 Kirby Zhou 2010-06-07 07:49:26 UTC
Additionally, please add ' blkio   = /cgroup/blkio;' into  /etc/cgconfig.conf.

Comment 5 Kirby Zhou 2010-06-07 07:51:48 UTC
And, add support of 'include /etc/cgconfig.d/*.conf' to /etc/cgconfig.conf, and add 'include /etc/cgrules.d/*.conf' to /etc/cgrules.conf

Comment 6 Jan Safranek 2010-06-07 07:54:48 UTC
Ahh, I see, the public beta has older libcgroup. Don't worry, libcgroup-0.36 is scheduled to RHEL 6.0. Which includes also blkio in default config.

Comment 7 Kirby Zhou 2010-06-07 08:04:53 UTC
Thanks,
Is therer a new public beta-2 scheduled?


Note You need to log in before you can comment on or make changes to this bug.