免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3603 | 回复: 10
打印 上一主题 下一主题

我的系统日志不记录了,怎么办? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-03-26 11:45 |只看该作者 |倒序浏览
我的系统日志不记录了,怎么办?

论坛徽章:
0
2 [报告]
发表于 2011-03-26 15:09 |只看该作者
重启一下syslogd进程

论坛徽章:
10
处女座
日期:2015-01-22 16:08:50技术图书徽章
日期:2018-09-13 11:25:52技术图书徽章
日期:2018-09-13 11:25:45技术图书徽章
日期:2018-09-13 11:25:37技术图书徽章
日期:2018-09-13 11:25:29黑曼巴
日期:2018-06-04 09:03:192017金鸡报晓
日期:2017-01-10 15:19:56极客徽章
日期:2016-12-07 14:03:402015年迎新春徽章
日期:2015-03-04 09:50:28技术图书徽章
日期:2018-09-13 11:26:01
3 [报告]
发表于 2011-03-26 15:31 |只看该作者
syslog.conf还在吧

论坛徽章:
0
4 [报告]
发表于 2011-03-26 16:57 |只看该作者
#ps -ef|grep syslogd
root 397      1   0    15:01:41?          0:00 /usr/sbin/syslogd
root 691  695   0    16:56:19 pts/2  0:00 grep syslogd

syslogd是否运行正常?


/etc/syslog.conf:

=======================
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License").  You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#ident        "@(#)syslog.conf        1.6        05/06/08 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                                                *
mail.*   -/var/log/maillog

# 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                                        *
)

论坛徽章:
0
5 [报告]
发表于 2011-03-26 17:36 |只看该作者
/var/adm/messages还有记录内容呀,说明syslogd是正常的,但是syslog为啥没有内容呢

论坛徽章:
0
6 [报告]
发表于 2011-03-26 17:37 |只看该作者
maillog也没有内容

论坛徽章:
0
7 [报告]
发表于 2011-03-26 18:18 |只看该作者
bash-3.2# syslogd -d
main(1): Started at time Sat Mar 26 18:08:58 2011
hnc_init(1): hostname cache configured 2037 entry ttl:1200
getnets(1): found 1 addresses, they are: ::.2.2
getnets(1): found 1 addresses, they are: 0.0.0.0.2.2
cfline(1): (*.err;kern.notice;auth.notice                        /dev/sysmsg)
cfline(1): (*.err;kern.debug;daemon.notice;mail.crit        /var/adm/messages)
cfline(1): (*.alert;kern.err;daemon.err                        operator)
cfline(1): (*.alert                                                root)
cfline(1): (*.emerg                                                *)
cfline(1): (mail.debug                        @loghost)
logerror(1): syslogd: line 45: WARNING: loghost could not be resolved
logerror_to_console(1): syslogd: line 45: WARNING: loghost could not be resolved
cfline(1): (user.err                                        /dev/sysmsg)
cfline(1): (user.err                                        /var/adm/messages)
cfline(1): (user.alert                                        root, operator)
cfline(1): (user.emerg                                        *)

  syslogd: version 1.111
  Started: Sat Mar 26 18:08:58 2011
Input message count: system 0, network 0
# Outputs: 9

------------------------ priority = [file, facility] ------------------------

0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
--------------------------------------------------
5 3 3 3 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X CONSOLE: /dev/sysmsg
7 3 2 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X FILE: /var/adm/messages
3 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: operator
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: root
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X WALL:
X 3 X X X X X X X X X X X X X X X X X X X X X X X CONSOLE: /dev/sysmsg
X 3 X X X X X X X X X X X X X X X X X X X X X X X FILE: /var/adm/messages
X 1 X X X X X X X X X X X X X X X X X X X X X X X USERS: root, operator
X 0 X X X X X X X X X X X X X X X X X X X X X X X WALL:

Facilities:
  [00] kern:   0
  [01] user:   8
  [02] mail:  16
  [03] daemon:  24
  [04] auth:  32
  [05] security:  32
  [06] mark: 192
  [07] syslog:  40
  [08] lpr:  48
  [09] news:  56
  [10] uucp:  64
  [11] audit: 104
  [12] cron: 120
  [13] local0: 128
  [14] local1: 136
  [15] local2: 144
  [16] local3: 152
  [17] local4: 160
  [18] local5: 168
  [19] local6: 176
  [20] local7: 184

Priorities:
  [00] panic:   0
  [01] emerg:   0
  [02] alert:   1
  [03] crit:   2
  [04] err:   3
  [05] error:   3
  [06] warn:   4
  [07] warning:   4
  [08] notice:   5
  [09] info:   6
  [10] debug:   7
  [11] none:  16



                Per File Statistics
File                            Tot        Dups        Nofwd        Errs
----                            ---        ----        -----        ----
/dev/sysmsg                     0        0        0        0
/var/adm/messages               0        0        0        0
operator                        0        0        0        0
root                            0        0        0        0
WALL                            0        0        0        0
/dev/sysmsg                     0        0        0        0
/var/adm/messages               0        0        0        0
root,operator                   0        0        0        0
WALL                            0        0        0        0


logerror(1): syslogd: syslogd pid 397 already running. Cannot start another syslogd pid 730

论坛徽章:
2
双鱼座
日期:2014-02-23 12:10:03操作系统版块每日发帖之星
日期:2015-12-17 06:20:00
8 [报告]
发表于 2011-03-26 20:03 |只看该作者
记录就正常了?

论坛徽章:
10
处女座
日期:2015-01-22 16:08:50技术图书徽章
日期:2018-09-13 11:25:52技术图书徽章
日期:2018-09-13 11:25:45技术图书徽章
日期:2018-09-13 11:25:37技术图书徽章
日期:2018-09-13 11:25:29黑曼巴
日期:2018-06-04 09:03:192017金鸡报晓
日期:2017-01-10 15:19:56极客徽章
日期:2016-12-07 14:03:402015年迎新春徽章
日期:2015-03-04 09:50:28技术图书徽章
日期:2018-09-13 11:26:01
9 [报告]
发表于 2011-03-26 22:49 |只看该作者
logerror(1): syslogd: line 45: WARNING: loghost could not be resolved
logerror_to_console(1): syslogd: line 45: WARNING: loghost could not be resolved

查查

论坛徽章:
0
10 [报告]
发表于 2011-03-28 09:54 |只看该作者
logerror(1): syslogd: line 45: WARNING: loghost could not be resolved
45行是:
mail.debug                        ifdef(`LOGHOST', /var/log/syslog, @loghost)
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP