On 6/13/2012 1:23 AM, Jan Safranek wrote:
> On 06/12/2012 09:08 PM, John Fastabend wrote:
>> Hi Jan,
>>
>> I'm looking at managing the net_prio cgroup via a daemon
>> I have created called cgdcbxd. The daemon monitors LLDP
>> negotiated application priorities (via DCBX) and creates
>> control groups using this info.
>>
>> https://github.com/jrfastab/cgdcbxd
>>
>> The problem I've encountered is because the control groups
>> are being created and removed dynamically already running
>> processes are not being moved into the correct control
>> groups via cgrulesengd. This is because cgrulesengd is
>> only kicked when it received a UID/GID or PROC EXEC event.
>>
>> So I need someway to get cgrulesengd to read the config file
>> and scan /proc/ for existing processes that match a
>> git/uid/procname entry and then move them into the correct
>> control group.
>>
>> Is this a known problem? Currently I'm working on creating
>> a signal handler in cgrulesengd to handle SIGUSR1 and do this
>> scan and process handling. Any thoughts? Maybe someone is
>> already working on this (wishful thinking).
>
> No, nobody is working on this. As you wrote, cgrulesengd handles UID/GID
> changes and also fork(). It ignores already running processes.
>
> It shouldn't be hard to add new signal handler though. Patches are
> welcome :)
>
> If your cgdcbxd already links libcgroup, you can also move the processes
> around directly in your daemon, libcgroup has API for that
> (cgroup_attach_task_pid or cgroup_change_cgroup_flags).
>
> Jan
>

Thanks Jan. I could move them around directly but cgrulesengd
is nice in that it is already integrated with the other sub
systems and has a well known config file.

I'll work up some patches probably next week sometime.

.John


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to