Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 1998 13:37:41 +0100
From:      Karl Pielorz <kpielorz@tdx.co.uk>
To:        Andrew Perry <andrew@python.shoal.net.au>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: watch or monitor program?
Message-ID:  <35657195.A7FA6623@tdx.co.uk>
References:  <Pine.BSI.3.95.980522213204.1161A-100000@python.shoal.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Perry wrote:
> 
> >
> > So what exactly does it "display" when it "displays w" (content, file-attribs,
> > ..) ???
> 
> it clears the screen and gives me the output of w (you know, who's logged
> in and what are they doing) and then it refreshes the display every 2
> seconds (by default, you can change it to whatever you like)
> 
>  9:31PM  up 4 days, 10:26, 3 users, load averages: 0.13, 0.39, 0.44
> USER     TTY FROM              LOGIN@  IDLE WHAT
> andrew   p1  eric              9:29PM     0 (pine)
> andrew   p2  eric              9:31PM     0 w
> 
> here's the man page if you're interested. I don't think we have anything
> like it yet. I might have to try and do it myself.

As a stop-gap you could try pasting the following into a file and running
it...

"
#!/bin/sh

while [ 1 ]
do
	clear
	w
	sleep 4
done
"

In fact you could probably write the whole 'watch' command as a simple shell
script...

OK, it's not curses optimized, but it works (as a stopgap)... ;-)

Regards,

Karl Pielorz

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35657195.A7FA6623>