zoukankan      html  css  js  c++  java
  • 【翻译自mos文章】Linux的/var/log/messages是空的(0k),messages.0, messages.1也是空的

    Linux的/var/log/messages是空的(0k),messages.0, messages.1也是空的
    来源于:
    The /var/log/messages is empty, and so are the rotated log files such as messages.0, messages.1,... (文档 ID 2053885.1)

    适用于:
    Linux OS - Version Enterprise Linux 4.0 to Oracle Linux 7.1 with Unbreakable Linux Kerne l[3.8.13] [Release RHEL4 to OL7U1]
    Linux x86-64
    Linux x86

    症状:
    在Oracle Linux上。messages 文件是空的,messages.1,messages.2等rotated files也是空的( rotated 产生的message文件名称依赖于 /etc/logrotate.conf配置文件)

    # cd /var/log
    ls -larth messages*
    -rwxrwxrwx 1 root root 0 Aug 8 22:32 messages.4
    -rwxrwxrwx 1 root root 0 Aug 15 22:32 messages.3
    -rwxrwxrwx 1 root root 0 Aug 22 22:32 messages.2
    -rwxrwxrwx 1 root root 0 Aug 29 22:32 messages.1
    -rwxrwxrwx 1 root root 0 Sep 5 22:32 messages

    原因:
    /etc/syslog.conf 文件被改动过,比方,凝视掉了以下的行:

    $ grep /var/log/messages /etc/syslog.conf 
    #*.info;mail.none;news.none;authpriv.none;cron.none /var/log/messages --------->>>注意最前面的#符号

    解决方式:
    1.取消凝视/etc/syslog.conf (/etc/rsyslog.conf on OL7/RHEL7) 中相关的行:

    $ grep /var/log/messages /etc/syslog.conf 
    *.info;mail.none;news.none;authpriv.none;cron.none /var/log/messages

    2.重新启动syslog service以生效上面的变化

    #service syslog restart

    在OL7或者RHEL7上。请使用例如以下的命令:

    #/bin/systemctl restart rsyslog.service
  • 相关阅读:
    向量求导几则公式备忘
    电脑硬件接触不良
    caffe编译新问题
    faster-rcnn 目标检测 数据集制作
    py-faster-rcnn 的makefile.config 注意事项
    ubuntu14.04 python + opencv 傻瓜式安装解决方案
    轻量级神经网络平台tiny-dnn实践
    OpenMP 并行编程
    React在Render中使用bind可能导致的问题
    为了cider,尝试emacs的坑
  • 原文地址:https://www.cnblogs.com/tlnshuju/p/7367865.html
Copyright © 2011-2022 走看看