Bug 1284076
Summary: | [RFE] Support for thread cgroups | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Daniel Bristot de Oliveira <daolivei> | ||||
Component: | procps | Assignee: | Ondrej Vasik <ovasik> | ||||
Status: | CLOSED ERRATA | QA Contact: | Branislav Náter <bnater> | ||||
Severity: | high | Docs Contact: | Petr Bokoc <pbokoc> | ||||
Priority: | unspecified | ||||||
Version: | 6.8 | CC: | albert, bnater, daolivei, pbokoc | ||||
Target Milestone: | rc | Keywords: | FutureFeature, Patch, RFE | ||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | procps-3.2.8-36.el6 | Doc Type: | Enhancement | ||||
Doc Text: |
*ps* can now display thread cgroups
This update introduces a new format specifier `thcgr`, which can be used to display the cgroup of each listed thread.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-05-11 00:29:01 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Daniel Bristot de Oliveira
2015-11-20 17:51:30 UTC
Hello Daniel. The manual only mentions cgroups in relation with processes, not threads. That means it only considers the cgroup of the parent. It isn't difficult to change the behaviour according to your needs, but the question is whether it is wise to do so in already released products like RHEL6 and RHEL7 as some of the procps(-ng) users might expect the current behaviour or even use custom scripts requiring the current behaviour and such change might cause a lot of troubles in the future ... more than we both think. There would have to be a new switch introduced that would change the behaviour conditionally and that also means it needs to go upstream first and be discussed in the upstream mailing list. I was thinking about that and we could introduce a new header for thread cgroups and export as a new field in the format specifier. That way the old behaviour would be kept intact and co-exist with the new one without conflicts. Created attachment 1106759 [details]
procps-3.2.8-ps-thread-cgroups.patch
This patch adds the 'thcgr' format specifier bound to the 'THCGR' header.
Results:
# ps -eLo pid,lwp,comm,cgroup | grep audit
846 846 kauditd cpuset:/
1121 1121 auditd cpuset:/app
1121 1122 auditd cpuset:/app
# ps -eLo pid,lwp,comm,thcgr | grep audit
846 846 kauditd cpuset:/
1121 1121 auditd cpuset:/app
1121 1122 auditd cpuset:/
Hello Daniel. Could you please test the above patch and let me know whether it suits your needs? Thanks, Jaromir. Hi Jaromir I agree on your opinion about not to change cgroup option, and I also agree on the proposed solution. Patch tested and approved. Thank you very much. -- Daniel Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-0904.html |