On 09/30/2011 05:45 PM, Vivek Goyal wrote: > On Fri, Sep 23, 2011 at 03:54:01PM +0200, Jan Safranek wrote: > [..] >> +If one or more config files are specified, only groups defined in the config >> +files are removed. The files are processed in reverse order, i.e. the last >> +file on command line is processed first, so \fBcgclear\fR can have the same >> +command line arguments as appropriate \fBcgconfigparser\fR. >> + >> +.TP >> +.B -l, --load=<filename> >> +specifies the config file to read. This option can be used multiple times >> and >> +can be mixed with \fB-L\fR option. > > Would -f be a better option here?
Someone already used -l in cgconfigparser and I wanted to have those options the same. > > [..] >> +.TP >> +.B -e >> +specifies that only empty groups should be removed. If a group defined in a >> +config file has tasks inside or has a subgroup, it won't be removed. This >> +option works only with \fB-l\fR or \fB-L\fR options. >> + > > So if I have a cgroup hierarchy. > > parent > | > child > > And there are no tasks in child group. Will both child and parent be > deleted? Or it will depend on the order whether parent's status was > examined beofre child or not. The answer is that it depends (at least now). cgclear -e -l /etc/cgconfig.conf sorts all groups in the cgconfig.conf and removes the child first if it is empty and then the parent. But, if child is *not* defined in the conf file, it won't be removed and so won't be parent, because it is not empty. I could add pruning of empty directories, if it is needed. Jan ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel