码迷,mamicode.com
首页 > 其他好文 > 详细

cgred不能自动将pid放入tasks

时间:2018-09-02 23:56:54      阅读:382      评论:0      收藏:0      [点我收藏+]

标签:pre   dha   etc   uid   man   resource   守护   问题:   group   

问题:

cgred不能自动将pid放入tasks
cgred / cgrulesengd - does not move new user pid to task file

https://serverfault.com/questions/724958/cgred-cgrulesengd-does-not-move-new-user-pid-to-task-file

该问题尚在找到原因,哪位大神如果知道,麻烦告知下。

cgred 守???护???进???程???

Cgred 是???一???个???守???护???进???程???,它???可???根???据???在??? /etc/cgrules.conf 文???件???中???设???定???的???参???数???将???任???务???移???动???到??? cgroup 中???。???/etc/cgrules.conf 文???件???中???的???条???目???可???以???使???用???以???下???两???个???格???式???之???一???:

user hierarchies control_group
user:command hierarchies control_group

例???如???:

maria           devices     /usergroup/staff

这???个???条???目???指???定???任???何???属???于???名???为??? maria 用???户???的???进???程???根???据???在??? /usergroup/staff cgroup 中???指???定???的???参???数???访???问???设???备???子???系???统???。???要???将???具???体???命???令???与???具???体??? cgroup 关???联???,请???添???加??? command 参???数???,如???下???:

maria:ftp       devices     /usergroup/staff/ftp

该???条???目???现???在???指???定???何???时???名???为??? maria 的???用???户???使???用??? ftp 命???令???,自???动???将???该???进???程???移???动???到???包???含??? devices 子???系???统???的???层???级???中???的??? /usergroup/staff/ftp cgroup 中???。???请???注???意???:该???守???护???进???程???只???有???在???符???合???适???当???的???条???件???后???才???可???将???该???进???程???移???动???到???该??? cgroup 中???。???因???此???,ftp 可???能???会???在???错???误???的???组???群???中???短???暂???运???行???。???再???有???,如???果???该???进???程???在???错???误???组???群???中???迅???速???生???出???子???进???程???,则???不???会???移???动???这???些???子???进???程???。???

/etc/cgrules.conf 文???件???中???的???条???目???可???包???括???以???下???额???外???符???号???:
@ - 当???在??? user 使???用???前???缀???时???,代???表???是???一???个???组???群???而???不???是???单???独???用???户???。???例???如???:@admins 是??? admins 组???群???中???的???所???有???用???户???。???

    • 代???表???“???所???有???”???。???例???如???:subsystem 字???段???中???的??? * 代???表???所???有???子???系???统???。???
      % - 代???表???与???以???上???行???中???项???目???相???同???的???项???目???。???例???如???:
@adminstaff     devices     /admingroup
@labstaff       %       %

参考

https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/6/html/resource_management_guide/sec-moving_a_process_to_a_control_group

cgred不能自动将pid放入tasks

标签:pre   dha   etc   uid   man   resource   守护   问题:   group   

原文地址:https://www.cnblogs.com/lanyangsh/p/9575622.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!