You are not logged in. Login Now
 0-24   25-49   50-64        
 
Author Message
nephi
Adding something like "watch" to Grex Mark Unseen   Apr 9 21:02 UTC 1996

It has been suggested that we add something like the "watch" program here on
Grex, so that people know when one of their friends has logged on.  

It has been noted that lots of other places have it (including M-net), and
that it hasn't caused problems for them.  

It has also been noted that this could help cut down on the number of times
that people run "w" "who" "users" "finger" etc.  

(I'm off to create more items!  8^)  
64 responses total.
steve
response 1 of 64: Mark Unseen   Apr 9 21:27 UTC 1996

   The problem with watch, as its currently written, is that it isn't
smart enough to know when it should go away and die.  Since it doesn't
it sits there in the background, not doing much.  Then something like
the kill_orphans program would have to come along and zap it.
   The best fix would be for watch to know when its controlling
terminal has died and die along with it.
dang
response 2 of 64: Mark Unseen   Apr 9 21:32 UTC 1996

This seems like a good idea to me.  The only question I have is if it would
be a significant drain on the system.  "e", "eho", "users", and "finger"
are only run sometimes, while "watch" would be run all the time
steve
response 3 of 64: Mark Unseen   Apr 9 22:06 UTC 1996

   I never checked, but it shouldn't be a drain.  Its the not going
away part that makes it a pain.
robh
response 4 of 64: Mark Unseen   Apr 9 22:12 UTC 1996

Maybe the watch programs could be set up so they terminate
after an hour or two, along with a message saying "watch program
terminating, please restart if necessary".  It's klunky, but
it would solve the cannot-be-killed problem.
janc
response 5 of 64: Mark Unseen   Apr 9 23:08 UTC 1996

I wrote the original version of watch used on M-Net.  It would watch the
originating user along with other users, and exit if it's originator logged
off.  It was one of the first programs I did on M-Net and wasn't very
portable.  I think a different version came into use after they moved to BSDI.

Watch does not do a "who" every few minutes.  It starts up by doing one "who"
and then it watch the end of the wtmp file, the one printed out by the "last"
command.  Thus it does rather little work and should not be a big system load.
It tended to be rather slow though, since it would only check the wtmp file
every two minutes or so, so sometimes a person would already be joining you
in party before "watch" told you he was there.  Increasing its polling rate
would increase is load on the system.

After M-Net moved to BSDI, I implemented a different version of watch.  In
this, the "watch" command just added (or removed) users from a global
who-is-watching-who database.  The actual message would be generated by the
login program.  When a person logs in, it checks if anyone was watching for
him, and sends notifications to those people.  This puts quite a bit less load
on the system, and means there are not 50 "watch" processes hanging around
on the system, doing the same thing for different users.  The messages would
also be very timely, appearing immediately as the user logs on.  The
disadvantage is that you don't get any "joe is logging off" messages when your
friends leave.  This version never got installed on M-Net.  Mostly, I didn't
have access to login source and nobody who did felt like installing this.

Another alternative would be to have a single global watch deamon.  It would
use a database similar to the one I implemented for the login-watch program,
but like the old watch it would watch the wtmp file.  Each time a user logged
on or off, it would notify all the users who were watching him.
janc
response 6 of 64: Mark Unseen   Apr 9 23:17 UTC 1996

Anyway, I think from the technical side, there are lots of ways you can make
a good, sound "watch" program.  I have code for various versions.  I probably
don't want to get into the project of assembling a good one for Grex right
now, just because I've got too much else on my plate now.  But if someone
wants to work on this, we should start a "garage" item to talk about it.

This policy item really ought to be about whether people want such a program
(and I can't see why not).  The technical issues don't really need to be in
this item.
kerouac
response 7 of 64: Mark Unseen   Apr 10 00:14 UTC 1996

  If "watch" is on, it would make an idle user appear to be active, which
would seem to cause problems.  But if the Sun04 has more space, I guess
the idle user problem isnt that critical as it used to be?
carson
response 8 of 64: Mark Unseen   Apr 10 00:56 UTC 1996

same demand for ports.
dang
response 9 of 64: Mark Unseen   Apr 10 01:36 UTC 1996

Again, this is a technical question.  There are two proposed methods that
would avoid this problem.  Also, do background procs contribute to lack of
idle time?
steve
response 10 of 64: Mark Unseen   Apr 10 02:27 UTC 1996

   Richard, watch would not make idle folk appear active.  It only
reports the logging in and out of entities.
janc
response 11 of 64: Mark Unseen   Apr 10 04:37 UTC 1996

Well, any program that regularly sends text to a user's terminal might make
them appear not-idle.  This is no particular reason not to have a watch.
ajax
response 12 of 64: Mark Unseen   Apr 10 05:22 UTC 1996

It could certainly make the GVC modems think a user is not idle, and so
not hang up on them.  But I agree with Jan...there are plenty of other
programs that can also do this, such as party.
anne
response 13 of 64: Mark Unseen   Apr 10 13:33 UTC 1996

Personally I like the idea of having a watch file, I use it quite
extensively on m-net.  It looks like it's not a significant drain
on resources- is the whole idea of it not going away when the 'owner'
of the watch file goes away the only problem?

albaugh
response 14 of 64: Mark Unseen   Apr 11 04:34 UTC 1996

My non-technical suggestion is this:  Ostensibly, cyber-friends feel
similarly about wanting to know whether their cyber-friends are on-line.
Well, when the new cyber-friend *comes* on-line, *he* can check to see who
is alreadying logged in, and contact his cyber-friends directly.
davel
response 15 of 64: Mark Unseen   Apr 11 11:21 UTC 1996

I agree with Kevin.  I don't really object to having something like watch
around, but it seems unnecessary.  And I remember how weird it felt, on a
certain other system, the first few times I logged in, when within seconds
I was receiving what seemed to me rather rude personal chat messages from
people I'd never heard of.  That kind of thing is easy enough without
watch, of course, but it seems rather like providing cans of spray paint
conveniently by the walls where you have graffiti problems.
arthurp
response 16 of 64: Mark Unseen   Apr 11 12:58 UTC 1996

I have also solved the 'doesn't go away after logout' problem by making the
process also watch the login that started it.  (I did that *after* I had my
account revoked for "making a denial of service attack" on them.  That was
an interresting couple days.  :)
kerouac
response 17 of 64: Mark Unseen   Apr 11 18:50 UTC 1996

  I think watch is fine but in case some people have objections, couldnt
something be put in so that if they dont want watch to note them
logging in, they could block it?
ajax
response 18 of 64: Mark Unseen   Apr 11 21:42 UTC 1996

Re 17, sure, but people can bypass something like that with their
own watch program.  The policy issues of a watch program seem
somewhat unimportant to me because of this.  It's like if someone
wants a program to type DING on their screen every hour; there's
nothing preventing them from doing so, whether Grex provides such
a program or not.  In the garage conference, there's a discussion
of the best way to implement a watch program, and some approaches
would need staff help, but a simple approach wouldn't.
kerouac
response 19 of 64: Mark Unseen   Apr 12 02:09 UTC 1996

  I look at a watch program the same way I look at caller id...someone
can have a caller id box and can see the number I'm calling from.  But
if I want anonymity I call 1167 or *67, and I can block my number
from being revealed.  This is what should be offered in conjunction with
watch.
steve
response 20 of 64: Mark Unseen   Apr 12 03:00 UTC 1996

   Um, can't be done.  Not without changing substancial parts of
UNIX.  Now, a theoritical 'watch' program could obey a .nowatch file
in someones home dir, but thats easily gotten around since the concept
behind watch isn't hard and in fact uses the publically readable
/etc/utmp file which 'who' uses.

   UNIX defaults to being fairly open.  We can't change that, nor
should we, in my opinion.

 
   I should point out that there is little keeping someone from 
writing their own version of watch right now.
ajax
response 21 of 64: Mark Unseen   Apr 12 03:59 UTC 1996

  Yep, that's the point I was trying to make.  Richard, since it's
something people can do manually, like by running finger and looking
for people, then there's nothing preventing anyone from writing a
script or program to do the same thing automatically.  I think the
closest you'll get to a *67 feature is to create a separate account!  :-)
popcorn
response 22 of 64: Mark Unseen   Apr 12 06:57 UTC 1996

(A note to anybody who wants to write a watch script or program: please put
some "sleep" commands in it, don't just loop continuously doing "who|grep"s.
Maybe do a "sleep 180" to sleep for 3 minutes between iterations, or at least
a "sleep 60".  Thanks!)
janc
response 23 of 64: Mark Unseen   Apr 12 16:53 UTC 1996

(Actually, any such solutions are horrible.  I think the reason I originally
wrote an official "watch" program for M-Net, long, long ago, was that various
people had started running hideous scripts to do that which wasted CPU and
often didn't exit correctly on logout.  Installing an official version that
behaved reasonably well was a deterrent for all the the lousy versions.
kerouac
response 24 of 64: Mark Unseen   Apr 13 01:04 UTC 1996

  #23...janc, well if that rationale was reasonable for m-net, wouldnt
having an "official" version of watch on grex also be a deterrent in the same
manner?
 0-24   25-49   50-64        
Response Not Possible: You are Not Logged In
 

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss