Java Mailing List Archive

http://www.redhatconfig.com/

Home » Red Hat Linux Discussion »

RE: sort "top" output and then save to file

Jai Rangi

2008-04-28

Replies: Find Java Web Hosting

Author LoginPost Reply
Something like this,
% ps aux | sort -nr -k +4


-Jai Rangi




-----Original Message-----
From: redhat-list-bounces@(protected)
[mailto:redhat-list-bounces@(protected)
Sent: Monday, April 28, 2008 1:14 PM
To: General Red Hat Linux discussion list
Subject: RE: sort "top" output and then save to file

Use ps command. Get the columns and sort you want and redirect the
output - Assumming you want a snapshot.

-----Original Message-----
From: redhat-list-bounces@(protected)
[mailto:redhat-list-bounces@(protected)
Sent: Monday, April 28, 2008 1:12 PM
To: redhat-list@(protected)
Subject: sort "top" output and then save to file

I am trying to save all the processes into a file by using top command:

top -cSb n 1 > proc.txt

It works fine but I want to sort it descending by the amount of memory
each proccess takes (descending).

I know how to do that interactively but how can i do when I run it as a
batch and save the output to a file.

I need to see some program that I think has some memory leaking problem.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)
https://www.redhat.com/mailman/listinfo/redhat-list


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)
https://www.redhat.com/mailman/listinfo/redhat-list
©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.