[Gllug] Getting top to output ascii and exit?
Daniel P. Berrange
dan at berrange.com
Sat Oct 1 19:28:34 UTC 2005
On Sat, Oct 01, 2005 at 08:19:02PM +0100, Rev Simon Rumble wrote:
> How can I get top to output one page and exit? I'm building a simple
> system monitoring web page and want it to give me whatever's hogging the
> system.
>
> This works from a shell:
> TERM=tt top -n 1
>
> But not inside my shell script. Any thoughts?
I thing you probably need to specify that it run it batch mode
with 'b' command lin arg, eg
top n 1 b
Regards,
Dan.
--
|=- GPG key: http://www.berrange.com/~dan/gpgkey.txt -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- berrange at redhat.com - Daniel Berrange - dan at berrange.com -=|
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list