On 06/22/2011 06:58 PM, Balbir Singh wrote:
> On Thu, Jun 23, 2011 at 6:22 AM, Kevin Constantine
> <kevin.constant...@disneyanimation.com>  wrote:
>> I apologize if this isn't the right list to ask questions.  I wasn't
>> able to find a libcg-users list.
>>
>
> This is the right place to ask
>
>>
>> I want to walk down the tree of cgroups, and if I see one that I
>> recognize, I want to delete it.  In order to use cgroup_delete_cgroup(),
>> I need a cgroup struct.  I can't seem to create a cgroup struct from any
>> of the information returned in a cgroup_file_info struct that I get back
>> from the cgroup_walk_tree function.
>>
>> Is there a way to get a cgroup struct from a cgroup_walk_tree() iteration?
>
> If you have the name, wouldn't cgroup_get_cgroup() give you what you
> want? Here is a general way I use it (and your question makes me
> wonder if I should do a better job of documenting it)
>
> 1. cgroup_new_cgroup followed by cgroup_get_cgroup() (given a name,
> get a filled struct cgroup)
> 2. If you want to set a value cgroup_new_cgroup(), then use wrappers
> to set the value and cgroup_modify_cgroup()
>
> I hope this helps,
> Balbir
>
> PS: We need a layer 2 API that should abstract these sort of problems

Thanks Balbir-

I thought that should work, but I was getting thrown by another issue 
entirely.

Once I have a cgroup struct from cgroup_get_cgroup(), it would be 
helpful to know what controllers it contains.  I can get a 
cgroup_controller struct with cgroup_get_controller(), but I need to 
know the controller name is to get that.

Is there a method to return the list of controller names (or controller 
structs) that are in a cgroup?

Thanks again

-kevin

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to