Bug 1807046

Summary: [RFE] allow atop to sort processes according to their state
Product: Red Hat Enterprise Linux 8 Reporter: Yogesh Babar <ybabar>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Jan Kurik <jkurik>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 8.0CC: agerstmayr, jkurik, mgoodwin, nathans, patrickm
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: pcp-5.3.0-1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 17:49:39 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:

Description Yogesh Babar 2020-02-25 14:19:10 UTC
Description of problem:

The pcp atop miss one crucial feature in terms of support engineer's perspective and that is we can not list the processes according to its state. For example, if we want to see processes that are stuck in D state. 

Version-Release number of selected component (if applicable):

pcp-4.3.0-3.el8.x86_64

How reproducible:


Steps to Reproduce:
1. run pcp atop
2. there is no switch to sort the processes according to their state
3.

Actual results:

You can not sort the processes according to their state in atop. At least the man page of atop does not talk of such a flag. 

Expected results:

Being support engineers we rely heavily on sorting the processes according to their state. For example - what was the top 10 D state processes. 


Additional info:

I am sure there will be some other way to get this info but it will be great if the atop provides such a flag. 

As of now, I do not see any specific matric on default pcp-zeroconf installation which will collect the process states related information.

Comment 1 Nathan Scott 2020-07-21 02:20:17 UTC
Hi Yogesh,

Indeed there is no such flag, as you found.  I think what you may want here is a filter on state (which also does not yet exist), so that only processes matching certain state(s) would be shown?  Perhaps something like the interactive 'S' key, except for process states.

I'm not sure how it would work otherwise - there's only 5 or so process states, so 'sorting' on that column would end up being pretty arbitrary (compare this to sorting on numeric values like memory use, CPU utilization, etc which are good sort keys for common process counts because there's a clear linear progression, eg from 0 to 100%).

Comment 4 Nathan Scott 2021-03-22 05:49:42 UTC
I've implemented something like #c1 - a comma-separated list of states can now be filtered on.

Upstream atop pull request is:  https://github.com/Atoptool/atop/pull/151

I'll see if Gerlof (original atop author) has any reservations and if not, will add to pcp-atop.

Comment 9 errata-xmlrpc 2021-11-09 17:49:39 UTC
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 (pcp bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2021:4171