Hi,

I was trying to find an easy way to automatically create per-user
cgroup, and was looking at libcg.
I could do what I want with a static configuration, or even create a
script do dynamically generate what I need, but maybe it could be done
directly in libcg configuration.
I think it would be great to have some kind of dynamic configuration
allowing to do that:
# cgrules.conf:
john          cpu              usergroup/faculty/john/


john:cp       cpu              usergroup/faculty/john/cp


@student      cpu,memory       usergroup/student/


peter         cpu              test1/

                                                                    %
           memory           test2/

                                                                 @root
         *               admingroup/

                                                              *
      *               users/$group/$user
# cgconfig.conf:
<...>

group users/$group/$user {       perm {               task {
            uid = $user;
                                                                   gid
= $group;               }                admin {
uid = root;                       gid = root;               }       }
     cpu {               cpu.shares = 500;       }}

Other variables could be used too, for example $tty, $sesid or even
$pgrp. I'm sure that the kind of feature that could even be enabled in
default installations (one cgroup per group for example).

Thanks,

-- 
Corentin Chary
http://xf.iksaif.net
------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to