Bug 585147

Summary: RFE: Add the possibility to see cgroup to top
Product: [Fedora] Fedora Reporter: Ivana Varekova <varekova>
Component: procpsAssignee: Jaromír Cápík <jcapik>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: matt, ovasik, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-08 19:23:45 UTC Type: ---
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 Flags
a non-complete patch none

Description Ivana Varekova 2010-04-23 09:14:45 UTC
Description of problem:
There is no method how to show control groups in top tool and it seems for me to be useful to have the option to show this data there.

Comment 1 Daniel Novotny 2010-04-23 09:25:40 UTC
Created attachment 408554 [details]
a non-complete patch

The work on the patch is/was in progress. There is something wrong with it, because top segfaults after some time when compiled with the patch, but I have not found out why. That is why this was not included in the distribution and why it still needs more work.

Comment 2 Ondrej Vasik 2010-04-23 13:31:43 UTC
Dan - to make it easier:

#define MAX_CGR_STRING 0x100 => it means 256 

you declare
char cgroups[MAX_CGR_STRING];
and
call
cgrlen = pid2cgroup(p->tgid,cgroups);
=>
static int pid2cgroup(int pid, char * outbuf)

so you have outpuf with max length of 256...

No wonder why it segfaults if you have:

while (( (c = fgetc(fd)) != EOF) && (counter<665)) {
     ...
                  outbuf[counter++]=';';
     ...
}

So few comments:
Why char filename[48]; ?
Why 665?
(Yes, I don't like magic numbers...)

Additionally, please use consistent indentation in the code - preferably with no tabs - just spaces. The rest of code is without tabs, so you are breaking its coding style. Also you have a few trailing spaces in your patch.

Comment 3 Fedora Admin XMLRPC Client 2010-05-20 12:30:05 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Ivana Varekova 2010-10-12 08:53:30 UTC
ping - anything new with this issue?

Comment 5 Jan Görig 2010-10-12 09:18:06 UTC
Top is using alphabet for columns identification and there are 26 columns now. We need to choose new way to add new columns. We are currently working on patch merging across distributions. This bug should be part of this process after we merge already existing patches.

Comment 6 Fedora Admin XMLRPC Client 2011-05-12 08:56:36 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Jaromír Cápík 2013-01-08 19:23:45 UTC
This feature is well supported by procps-ng (available in Fedora 18 and later). I'm closing this bug.