[comp.unix.admin] terminal watcher?

efinley%peruvian.utah.edu@cs.utah.edu (Elliott Finley) (11/03/90)

Sorry if this has been asked recently, I haven't been following this
group.

We are switching some of our INGRES applications from VMS to ULTRIX
and here is the situation...

On the vms machines we have a terminal watcher program that comes in
really handy when a user calls up and says "I'm getting such and such
error".  To find out exactly what the problem is, we just watch the
terminal and have them generate the error again.  

So the question, is there the same kind of utility for UNIX (ULTRIX)?

If so, where can I get it from (preferably FTP)

  Thanks in advance...

        Please reply to efinley@peruvian.utah.edu (Elliot Finley)

                  as I don't read this group regularly...

jko@jdyx.UUCP (Jonathan O'Neal) (11/05/90)

efinley%peruvian.utah.edu@cs.utah.edu (Elliott Finley) writes:

>Sorry if this has been asked recently, I haven't been following this
>group.

>We are switching some of our INGRES applications from VMS to ULTRIX
>and here is the situation...

>On the vms machines we have a terminal watcher program that comes in
>really handy when a user calls up and says "I'm getting such and such
>error".  To find out exactly what the problem is, we just watch the
>terminal and have them generate the error again.  

>So the question, is there the same kind of utility for UNIX (ULTRIX)?
>If so, where can I get it from (preferably FTP)

>  Thanks in advance...
>        Please reply to efinley@peruvian.utah.edu (Elliot Finley)
>                  as I don't read this group regularly...
   Please also reply to jko@jdyx.atlanta.ga.us (or to this group) - I'm also
interested.  We have a similar program on our Prime system that allows both
terminal "peeking" and terminal "poking" (writing to their input buffer,
effectively letting you type for them).  We're moving from Prime to Unix and
really need such a program...

   Thanks in advance.

   -jko

brnstnd@kramden.acf.nyu.edu (Dan Bernstein) (11/06/90)

  [ how to redirect input and output of a tty session? ]

The basic idea is to run the session under pty, which appeared in volume
23 of comp.sources.unix (try anonymous ftp to wuarchive.wustl.edu).
There are several ways to automatically use pty for any login session.
Then you'll have to figure out exactly what data flows where, and what
form of interprocess communication to use.

A primitive example: Move login to login.real, make a root-only
directory /etc/pipes, and add a new mode-700 login shell script like

  #!/bin/sh
  mknod /etc/pipes/in.$$ p
  (cat /etc/pipes/in.$$ & ; cat) | pty login.real | tee /etc/pipes/out.$$
  rm /etc/pipes/in.$$ /etc/pipes/out.$$

Now anything written to /etc/pipes/in.$$ will be written to the session
as input, and output will be recorded in /etc/pipes/out.$$. (Caveat: I'm
making this up as I go along.)

pty has been thoroughly tested under several Ultrix variants (though one
respondent is seeing strange problems under an Ultrix 3.1 revision), as
well as many other BSD-derived systems. I don't know what system type
the second poster has.

Note that it is extremely difficult to force a watcher program onto a
user who doesn't want to be watched. There are just too many ways to
execute commands. If you want a proper auditing system, ask your vendor.

---Dan

hal@cc.usu.edu (11/08/90)

In article <1990Nov5.083004.11348@jdyx.UUCP>, jko@jdyx.UUCP (Jonathan O'Neal) writes:
> efinley%peruvian.utah.edu@cs.utah.edu (Elliott Finley) writes:
> 
>>Sorry if this has been asked recently, I haven't been following this
>>group.
> 
>>We are switching some of our INGRES applications from VMS to ULTRIX
>>and here is the situation...
> 
>>On the vms machines we have a terminal watcher program that comes in
>>really handy when a user calls up and says "I'm getting such and such
>>error".  To find out exactly what the problem is, we just watch the
>>terminal and have them generate the error again.  
> 
>>So the question, is there the same kind of utility for UNIX (ULTRIX)?
>>If so, where can I get it from (preferably FTP)
> 
>>  Thanks in advance...
>>        Please reply to efinley@peruvian.utah.edu (Elliot Finley)
>>                  as I don't read this group regularly...
>    Please also reply to jko@jdyx.atlanta.ga.us (or to this group) - I'm also
> interested.  We have a similar program on our Prime system that allows both
> terminal "peeking" and terminal "poking" (writing to their input buffer,
> effectively letting you type for them).  We're moving from Prime to Unix and
> really need such a program...
> 
>    Thanks in advance.
> 
>    -jko
I need it too for ultrix. 

hal

hal@cc.usu.edu
usu::hal

ag@cbmvax.commodore.com (Keith Gabryelski) (11/08/90)

In article <1990Nov2.135939.13150@hellgate.utah.edu> efinley%peruvian.utah.edu@cs.utah.edu (Elliott Finley) writes:
>On the vms machines we have a terminal watcher program that comes in
>really handy when a user calls up and says "I'm getting such and such
>error".  To find out exactly what the problem is, we just watch the
>terminal and have them generate the error again.  

I posted `advise' to alt.sources about a month ago which will work
under SVR4 streams.

I will be posting a revised version that will work on SVR3 streams
to comp.sources.unix in a couple of weeks.

Pax, Keith