输出消息的类型 格式: facility.level; facility.level. 输入消息的位置
*.err;kern.notice;auth.notice /dev/sysmsg
*.err;kern.debug;daemon.notice;mail.crit /var/adm/messages
重启syslog
/etc/init.d/syslog stop
/etc/init.d/syslog start
The selector field is a semicolon-separated list of priority specifications in the following format: facility.level; facility.level.
-
The facility field can contain only 16 codes:
-
kern Messages generated by the kernel.
-
user Messages generated by user processes.
-
mail The mail system.
-
daemon System daemons, such as the in.ftpd and the telnetd daemons.
-
auth The authorization system, including the login and su commands.
-
syslog Messages generated internally by the syslogd daemon.
-
lpr The line printer spooling system, such as the lpr and lpc commands.
-
news Files reserved for the USENET network news system.
-
uucp (obsolete) The UNIX-to-UNIX copy (UUCP) system does not use the syslog function.
-
cron The cron and at facilities, including crontab, at, and cron.
-
local0-7 Eight user-defined codes.
- the level selector specifies the severity or importance of the message. Each level includes all the levels above (of a higher severity). To remember the sequence for the certification exam you can use an appropriately constructed phase like "Every alerted cardriver escapes warning notice"
-
emerg 0 Panic conditions that are normally broadcast to all users
-
alert 1 Conditions that should be corrected immediately, such as a corrupted system database. Only sysadmin of a particular server needs to be informed by mail or paged.
-
crit 2 Warnings about critical conditions, such as hard device errors.
-
err 3 Errors other than hard device errors
-
warning 4 Warning messages, that generally does not interfere with normal operation.
-
notice 5 Non-error conditions that might require special handling
-
info 6 Purely informational messages (usually does not require any handling)
-
debug 7 Messages that are normally used only when debugging a program
-
none 8 Messages are not sent from the indicated facility to the selected file
分享到:
相关推荐
Syslog 是 Unix 类操作系统上的一个系统日志工具,负责记录内核和应用程序产生的日志信息。Syslog 日志消息既可以记录在本地文件中,也可以通过网络发送到接收 syslog 的服务器。接收 syslog 的服务器可以对多个设备...
Syslog的配置文件`/etc/syslog.conf`允许管理员自定义日志记录的行为,从而更好地监控系统运行状况、排查问题和维护系统安全。 #### 二、Syslog配置文件详解 ##### 1. 基本格式 `syslog.conf`文件的每一行遵循...
syslog采用可配置的、统一的系统登记程序,随时从系统各处接受log请求,然后根据/etc/syslog.conf中的预先设定把log信息写入相应文件中、邮寄给特 定用户或者直接以消息的方式发往控制台。 好吧,问题又来了。系统中...
rsyslog是syslog的扩展,它不仅能够处理本地日志,还能接收和转发来自远程系统日志消息。在进行rsyslog日志服务器配置之前,应确保rsyslog服务已经在系统中安装。 服务器端配置是日志系统的核心。首先,我们需要...
在CentOS 7系统中,主要通过`/etc/rsyslog.conf`这个配置文件来管理syslog服务。为了实现日志转发功能,需要在这个文件中添加相应的配置项。 **具体操作如下:** 1. 使用文本编辑器打开`/etc/rsyslog.conf`文件。 ...
2. /etc/syslog.conf:这是 syslog 服务的主要配置文件,根据定义的规则导向日志信息。 五、Syslog 服务的 Facility 和 Level Syslog 服务的 Facility 和 Level 是 syslog 服务的两个重要概念: 1. Facility:...
syslog采用可配置的、统一的系统登记程序,随时从系统各处接受log请求,然后根据/etc/syslog.conf中的预先设定把log信息写入相应文件中、邮寄给特 定用户或者直接以消息的方式发往控制台。值得注意的是,为了防止...
1. 在Unix系统/etc/syslog.conf文件最后追加以下2行 * *.err @采集机IP地址(中间以Tab健分割) * auth.info @采集机IP地址(中间以Tab健分割) 2. 用下面的命令停止syslog服务:Kill -9 syslogd 3. 用下面的命令...
总的来说,syslogd是Linux系统日志的核心,它通过`/etc/syslog.conf`配置实现日志信息的收集、过滤和分发,为系统管理和维护提供了强大的支持。理解并熟练掌握syslogd的配置和使用,对于提升Linux系统管理效率和安全...
在 AIX、Linux 和 Solaris 操作系统中,日志配置方法是通过修改 /etc/syslog.conf 文件来实现的。具体步骤如下: 首先,使用 Root 帐号登陆目标系统,然后查看 /etc/syslog.conf 文件,是否已经成功添加以下内容: ...
`/var/log`目录是存放系统日志文件的标准位置,其中`/var/log/syslog`是用于存储系统广泛事件的一个日志文件,虽然不是所有Linux发行版如CentOS或Fedora都默认生成这个文件,但可以通过配置`/etc/syslog.conf`或`...
要配置远程登录,需要在发送登录记录的系统上修改 /etc/syslog.conf 文件,增加类似如下的内容: *.info @loghost.mydomain.com 这将使得 Syslog 将所有 *.info 等级的登录记录发送到 loghost.mydomain.com 的远程...
syslog的主要配置文件是`/etc/syslog.conf`,这个文件定义了不同类型的系统信息如何被处理和存储。配置行由两部分组成:设备和服务等级。设备部分是消息类型,如`auth`, `cron`, `kern`等,后接服务等级,表示消息的...
- `/etc/syslog.conf`中指定的工具名称及信息等级必须与H3C路由器上`info-center loghost`和`info-center source`命令的相应参数保持一致,否则日志信息可能无法正确输出到日志服务器。 #### 四、总结 通过上述...
在Unix-Syslog-1.1.tar.gz中,用户可以找到用于配置syslogd的配置文件,通常名为`/etc/syslog.conf`。该文件定义了日志消息的处理规则,如哪些类型的消息应被记录,记录到哪个文件,以及如何转发到其他服务器。 四...
使用下面的步骤来设置ftp进行日志记录: 1.# cp /etc/inetd.conf /etc/inetd.conf.bak 2.# vi /etc/inetd.conf 编辑如下的ftp行,在最后加上-l标志: ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd -l 3.# vi /...
- 编辑`/etc/syslog.conf`文件,添加日志服务器地址以及日志级别等信息。 - 示例配置: `fwlog @192.168.7.200 local5.info` - 重启Syslog服务: `services syslog restart` - 使用以下命令将日志信息转发至日志...