On Saturday 29 November 2003 17:15, Tom Wesley wrote:
> On Sat, 2003-11-29 at 17:06, Ernie Schroder wrote:
> >     OK so the box crashed again after being up less than an hour. It was
> > running gtk-gnutella mplayer kmail and one MoxillaFirebird brower.
> > the /var/log/messages shows nothing. I've openet 2 konsoles on my
> > desktop after disabling the screen saver and the plan is to run top
> > in one and ps aux in the other.
> >     What I'd like to do is run ps aux every 30 seconds or so to see if it
> > catches something I'm overlooking. I've looked around to see how to
> > automate that without success. Can someone give me a command that
> > will loop the ps aux command?
> >

<snip>

> Try the following bash:
>
> while true; do ps aux; sleep 5; done
>
> to update the output every 5 seconds.  Use Ctrl+C to stop it.

You can also use the "watch" command, e.g. "watch ps aux" would run "ps aux" 
every 2 seconds and display the results. If you want to run it every 30 
seconds just do "watch -n 30 ps aux". "man watch" for details. BTW, watch is 
in sys-apps/procps package, so you already have it.


Hope that helps.

Cheers,
Renat


--
[EMAIL PROTECTED] mailing list

Reply via email to