Bug 585147 - RFE: Add the possibility to see cgroup to top
Summary: RFE: Add the possibility to see cgroup to top
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: procps
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jaromír Cápík
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-23 09:14 UTC by Ivana Varekova
Modified: 2013-01-08 19:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-08 19:23:45 UTC
Type: ---
Embargoed:


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

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.


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