Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tlogger(1) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

tlog

shutdown

kill

tlogger

PURPOSE

     Gathers I/O from a terminal and writes it to a log file.

SYNOPSIS
     tlogger [-c /usr/adm/ras/tlogfile][-c file][-b /usr/adm/rcs/tlogfile.bk]
             [-b file] &


DESCRIPTION

     The terminal-logging daemon tlogger collects data read or
     written to  its associated terminal and  writes that data
     to a log file.  Each time the daemon is started, the con-
     tents  of the  current log  file replace  the backup  log
     file.  A new current log file is created with permissions
     set to allow read and write by the owner.

     The associated  terminal is  identified in  the following
     manner:  Standard error is assumed to be the correct ter-
     minal if it is a  terminal device ( isatty() returns true
     ).  Otherwise, the process's  usrinfo is used to identify
     the login terminal, and that device is used.

     The tlogger  daemon creates  a message queue,  and passes
     that queue id to the  associated terminal using the ioctl
     TCLOG  system call.   The  daemon then  loops waiting  on
     message queue data;  it writes any message  queue data it
     receives to  the end of  the current log file.   The ter-
     minal log daemon will catch all signals (except SIGKILL).
     On receipt of a signal,  the daemon issues an ioctl TCLOG
     to  its associated  terminal to  turn off  logging.  This
     causes the  terminal to  stop sending log  messages.  The
     daemon  then removes  the message  queue and  exits.  The
     daemon also terminates  if it can no longer  write to the
     log file due to file  size constraints.  In this case, an
     error message is written to standard error.

     The tlogger  daemon should  be started in  the background
     either  from /etc/rc,  or  from the  command line.   This
     starts the terminal  sending its I/O data  to the daemon.
     The tlog command can then be  used to stop or restart the
     sending of terminal I/O to the daemon.  The daemon itself
     may be terminated with the  kill command, but would ordi-
     narily continue to run until shutdown occurs.

     Notes:

     1.  SIGKILL should not be used  to stop the daemon, since
         cleanup of  system resources  cannot be done  in that
         case.

     2.  It may be necessary to prevent passwords from showing
         up in the  terminal logs. You can  prevent the system
         from logging  passwords by having the  getpass() sub-
         routine turn off terminal logging while it is reading
         the password.  The login, adduser, newgrp, and passwd
         commands use this subroutine.

FLAGS

     -b filename          Specifies a  file to be used  as the
                          backup log file.  The default backup
                          file is /usr/adm/ras/tlogfile.bk.
     -c filename          Specifies a  file to be used  as the
                          current   log  file.    The  default
                          current            file           is
                          /usr/adm/ras/tlogfile.

FILES

     /etc/rc                  System startup file.
     /usr/adm/ras/tlogfile    Default current log file.
     /usr/adm/ras/tlogfile.bk Default backup log file.

RELATED INFORMATION

     The following commands:  "tlog,"  "shutdown," and "kill."

     The ioctl system  call and the getpass  subroutine in AIX
     Operating System Technical Reference.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026