[comp.unix.ultrix] Redirecting console messages

wyatt@cfa.UUCP (Bill Wyatt) (12/08/87)

I'm running Ultrix 2.0, Xv10R4 on a VSII/GPX. I want to divert error
messages away from the underlying console window, and I can't make
xcons do it, at least not completely. The motivation was trying to
suppress certain tape driver error messages that my code forces sometimes
in order to test the tape driver state.

First, I experimented by just executing:

  xcons ttyv0 qconsole &

where the major and minor dev nos. of qconsole are (42, 1) as usual
for the QDSS.  (BTW, the README note in the xcons source directory is
wrong about the argument order, but it's obvious in the source). This
redirected messages from `su' just fine. But wait... 

Next, as recommended in the above README, I put this line in /etc/ttys:

  qconsole "/usr/bin/xcons ttyv0" none on

This did nothing, even with kill -1 1, shutdown and back up, or rebooting.
To no avail, I also tried:

  qconsole "/usr/bin/xcons ttyv0 qconsole" none on

In any case, I proceeded on with manual execution (actually in my
.login) of the xcons program. Then, I discovered THE DRIVER ERROR
MESSAGES ARE NOT REDIRECTED! From the source, apparently the printf()
routine in the tape driver (tmscp.c in this case) goes to the console
(and to the error logger, but that's apparently irrelevant here) no
matter what. I haven't been able to deflect those characters! I even
tried xcons from console to /dev/null, but nothing seems to do it. 

Questions:

1) What's the correct /etc/ttys line?
2) How can I redirect the kernel error messages?
3) Failing (2), can I suppress kernel error messages at all? Doesn't look
  like it from the source.

Bill    UUCP:  {husc6,ihnp4,cmcl2,mit-eddie}!harvard!cfa!wyatt
Wyatt   ARPA:  wyatt@cfa.harvard.edu
         (or)  wyatt%cfa@harvard.harvard.edu
      BITNET:  wyatt@cfa2
        SPAN:  cfa2::wyatt 

jmsellens@watdragon.waterloo.edu (John M. Sellens) (12/17/87)

In article <15559@felix.UUCP> wyatt@cfa.UUCP (Bill Wyatt) writes:
>
>I'm running Ultrix 2.0, Xv10R4 on a VSII/GPX ...
>
>Next, as recommended in the above README, I put this line in /etc/ttys:
>
>  qconsole "/usr/bin/xcons ttyv0" none on
>
>This did nothing, even with kill -1 1, shutdown and back up, or rebooting.
>To no avail, I also tried:
>
>  qconsole "/usr/bin/xcons ttyv0 qconsole" none on
>
>Questions:
>
>1) What's the correct /etc/ttys line?

Under Ultrix 1.2, I found that init, being a somewhat goofy program,
used exactly 8 characters for the device, and didn't allow for a '\0'
to terminate the string. ("qconsole" is 8 characters long)  After
laughing, and muttering "typical stock UNIX junk", I rename qconsole
to qdcons.  I now use this in /etc/ttys

qdcons "/usr/bin/xcons ttyv0" dumb on

and /dev/qdcons is 42,1 mode 666.  This seems to work for most things,
but I seem to recall some things still getting scribbled on the
console.  So I bind f.refresh to meta-shift-right down in my .uwmrc.

John