Re: top command results from an ssh
- Date: Fri, 16 May 2008 05:23:20 -0700
- From: Mike Bird <mgb-debian@xxxxxxxxxxxx>
- Subject: Re: top command results from an ssh
On Fri May 16 2008 04:39:10 avilella wrote:
> how can I get the results of doing a "top" sorted by memory usage from
> an ssh command?
>
> Sth like:
>
> ssh a-computer top
>
> Is this doable?
It's doable but ugly:
ssh a-computer top -b -n1 | tail -n+8 | sort -n -k1.46,1.50
You might want to see if ps fits your needs, e.g.:
ssh a-computer ps vax --sort=rss
--Mike Bird
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx