- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Memory usage based sorting using top
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2006 10:52 PM
04-03-2006 10:52 PM
By default "top" command gives the process list sorted (descending) on CPU usage. I want to know if there is any way to make the tool print the process list sorted on memory usage.
If not using top, can I use any other command/utility to get this required output?
Is it possible to have all the statistics (like CPU usage and Mem. usage) for a single process using top?
Thanks for any help in this.
Regards,
Tapan.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2006 10:55 PM
04-03-2006 10:55 PM
Re: Memory usage based sorting using top
You can use UNIX95 variable with ps.
UNIX95= ps -efH
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2006 11:00 PM
04-03-2006 11:00 PM
SolutionSorry for the second post, check this thread and take a look at Geoff's script
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=838754
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2006 11:03 PM
04-03-2006 11:03 PM
Re: Memory usage based sorting using top
UNIX95=1 ps -ef -o pid,sz,vsz,comm
sz and vsz will give memory related informations.
You can use glance tool for accurate informations.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2006 11:48 PM
04-04-2006 11:48 PM
Re: Memory usage based sorting using top
#!/usr/bin/sh
# *******
ps -elf|awk '{print $10, $3, $4, $15, 16}'|sort -nr|more
exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2006 02:23 AM
04-05-2006 02:23 AM
Re: Memory usage based sorting using top
UNIX95=1 ps -e -o vsz,pid,ppid,args | sort -rn | head -20
Otherwise, be aware that programs share a number of memory areas such as libraries, text, data (shared memory segmants) and the buffer cache.
Bill Hassell, sysadmin