Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tlogger(8) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

shutdown

kill

ioctl

getpass subroutine in AIX Operating System



TLOGGER(8,C)                AIX Commands Reference                 TLOGGER(8,C)



-------------------------------------------------------------------------------
tlogger



PURPOSE

Writes data to a log file.

SYNTAX


                +- -c /usr/adm/ras/tlogfile -+
/etc/tlogger ---|                            |--->
                +--------- -c file ----------+

    +- -b /usr/adm/ras/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 contents 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 terminal 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 terminal log daemon catches 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 ordinarily continue to run until shutdown occurs.





Processed November 8, 1990       TLOGGER(8,C)                                 1





TLOGGER(8,C)                AIX Commands Reference                 TLOGGER(8,C)



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() subroutine turn off terminal logging while it is reading the
    password.  The login, adduser, newgrp, and passwd commands use this
    subroutine.

FLAGS

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

-c file               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

See the following commands:  "shutdown" and "kill."

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
























Processed November 8, 1990       TLOGGER(8,C)                                 2



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