On Wed, Nov 01,  at 12:00:00AM, Christopher Sawtell wrote:
> On Tuesday 31 October 2006 23:22, Don Gould wrote:
> > I'm reading the man but not sure if I can cron a top >> logfile.
> No you can't. Top is specifically oriented to a display on the terminal.

top can output to file or programme using the -b option. 

example:

top -n 1 -b | $PAGER

useful as an "alias" because top normally displays only about
half its output to terminal but in the $PAGER you get the complete
output.

In Dons case top can run as a cron job every 15 secs using -n 1 or
run in the background without cron with -n being a very large number.  

example:

top -n 10000 -b >> logfile.txt

Top has had new features added in the last four years and is better
than it used to be. It can now toggle and configure colour with
the "z" and "Z" hotkeys.

> > My cc server keeps going mad leaving me no choice than a reboot.

2.6.X kernels have many new features particularly the convenience of 
udev on a desktop machine but for servers 2.4.X is still considered
more stable. Take a look at memory management and processes swapping
excessively.
 
---
keith.

Reply via email to