logmsg(1M) (RM400 only) logmsg(1M)
NAME
logmsg - log system startup messages
SYNOPSIS
/sbin/logmsg tag priority [message]
/sbin/logmsg -copy
DESCRIPTION
logmsg is used for logging system messages during the startup and
shutdown phases where the syslogd daemon is not yet or is no longer
active. Messages that are passed on to logmsg are stored in a tem-
porary file /startuplog.tmp, and are later passed on to the syslogd
daemon explicitly using the "/sbin/logmsg -copy" command.
Two variants of logmsg can be used:
/sbin/logmsg tag priority message
or
command | /sbin/logmsg tag priority
Each message is assigned a tag and a priority. The tag, priority, and
message are stored temporarily with a time stamp in the file
/startuplog.tmp.
ARGUMENTS
tag Identifies the sender of the message and should be the name of
the sending program (e.g. "$0").
priority
The values of priority correspond to those defined in
syslog.conf(4) for "level", e.g. debug, info, notice. Messages
with a higher priority than "info" are passed directly on to
stdout, but are later passed on to the syslogd daemon with prior-
ity user.info. Messages with a higher priority than notice are
appended with the word "WARNING" or "ERROR".
message
Any text. Interpretation of messages with metacharacters (e.g.
\n) corresponds to that of the echo(1) command.
If no specification is made for message, stdin input is used.
-copy
After the syslogd daemon has been started, all temporarily stored
messages are to be passed on to the syslogd daemon using
"/sbin/logmsg -copy". The /startuplog.tmp file is deleted after
successful transfer.
Page 1 Reliant UNIX 5.44 Printed 11/98
logmsg(1M) (RM400 only) logmsg(1M)
All messages are logged to the facility parameter user and the level
parameter debug or notice by syslog(3C) with the tag `basename tag`.
USAGE
logmsg can be used in all rcX scripts. Logging of all startup and
shutdown messages is made possible as a result of the following modif-
ications:
1) In the file /etc/inittab:
Replace all calls for
/sbin/rcX
with
/sbin/rcXlog
(X stands for 0, 1, 2, 3, 6, S).
After the line "r6:...", and before the line "co:...", insert:
sl:23:wait:/sbin/logmsg -copy >/dev/console 2>&1
2) In /sbin/rc2 and /sbin/rc3:
As the last line, insert:
echo "ExIt LoGmSg"
This string from echo is interpreted by logmsg and terminates the
program called in a pipe by /sbin/rcXlog.
In a standard configuration, all startup and shutdown messages are
logged in /var/adm/log/messages.
FILES
/startuplog.tmp
/var/adm/log/messages
SEE ALSO
syslogd(1M), syslog(3C), syslog.conf(4).
Page 2 Reliant UNIX 5.44 Printed 11/98