在/etc/syslog.conf
#ident "@(#)syslog.conf 1.5 98/12/14 SMI" /* SunOS 5.0 */ # # Copyright (c) 1991-1998 by Sun Microsystems, Inc. # All rights reserved. # # syslog configuration file. # # This file is processed by m4 so be careful to quote (`') names # that match m4 reserved words. Also, within ifdef's, arguments # containing commas must be quoted. # *.err;kern.notice;auth.notice /dev/sysmsg *.err;kern.debug;daemon.notice;mail.crit /var/adm/messages *.alert;kern.err;daemon.err operator *.alert root *.emerg * # if a non-loghost machine chooses to have authentication messages # sent to the loghost machine, un-comment out the following line: #auth.notice ifdef(`LOGHOST', /var/log/authlog, @loghost) mail.debug ifdef(`LOGHOST', /var/log/syslog, @loghost) # # non-loghost machines will use the following lines to cause "user" # log messages to be logged locally. # ifdef(`LOGHOST', , user.err /dev/sysmsg user.err /var/adm/messages user.alert `root, operator' user.emerg * )
我GOOGLE了一些,似乎根和运营商的意思是电子邮件的根源和运营商。 它是否正确?
一些添加到lain的答案。 如果您是root用户,您将不会看到根邮件。 tty实际上必须由root拥有,你可以这样查看:
ls -l `tty`
“运营商”不是一个实际的用户,而是将日志消息发送到控制台。 你不能总是看到控制台,因为GUI运行在它之上。 您可以通过以根用户身份运行它来打开控制台窗口:
xterm -C
当我们在运营商监控的服务器上通常有串行控制台时,现在很多东西是历史性的。 您可以看到logging的内容是显示内核错误,可能是由于硬件故障和服务器进程故障造成的。
user.alert消息将被发送到根用户和操作员用户login到的terminal。 这是syslog.conf手册页
bash-3.00# logger -p user.alert "Test" Dec 28 22:40:26 solbase root: [ID 702911 user.alert] Test bash-3.00#