Bug 547749

Summary: top utility can't sort by memory usage in batch mode
Product: Red Hat Enterprise Linux 5 Reporter: Matt Miller <mamiller>
Component: procpsAssignee: Jaromír Cápík <jcapik>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: low    
Version: 5.3CC: albert, cward, ovasik, psplicha
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: procps-3.2.7-18.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 746997 (view as bug list) Environment:
Last Closed: 2011-11-29 14:07:03 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
patch to add -m option to top.c none

Description Matt Miller 2009-12-15 15:32:53 UTC
Created attachment 378537 [details]
patch to add -m option to top.c

Description of problem:
We need to be able to capture output from 'top' in batch mode, but sort the processes via memory consumption. Currently this option is only available in interactive mode via Shift-M

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

Additional info:
Please mark this as a feature request if that is appropriate. I'm attaching a patch to the procps-3.2.7 SRPM that would add a "-m" option that would automatically sort by memory usage. It would be great if this type of option could be added to this, as well as the RHEL4 package as well.

Comment 1 Daniel Novotny 2010-04-01 11:38:57 UTC
hello Matt,
thanks for the patch. if procps gets into next rhel update, we will add it

Comment 9 errata-xmlrpc 2011-11-29 14:07:03 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2011-1497.html