Bug 585147 - RFE: Add the possibility to see cgroup to top
RFE: Add the possibility to see cgroup to top
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: procps (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Jaromír Cápík
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-23 05:14 EDT by Ivana Varekova
Modified: 2013-01-08 14:23 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-08 14:23:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
a non-complete patch (9.79 KB, patch)
2010-04-23 05:25 EDT, Daniel Novotny
no flags Details | Diff

  None (edit)
Description Ivana Varekova 2010-04-23 05:14:45 EDT
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 05:25:40 EDT
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 09:31:43 EDT
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 08:30:05 EDT
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 04:53:30 EDT
ping - anything new with this issue?
Comment 5 Jan Görig 2010-10-12 05:18:06 EDT
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 04:56:36 EDT
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 14:23:45 EST
This feature is well supported by procps-ng (available in Fedora 18 and later). I'm closing this bug.

Note You need to log in before you can comment on or make changes to this bug.