syslog doesn't exist!

17,805

The output of apt-cache policy rsyslog says, rsyslog isn't installed on your system, therefore

sudo apt-get install rsyslog
Share:
17,805

Related videos on Youtube

Henrique Ramos
Author by

Henrique Ramos

Updated on September 18, 2022

Comments

  • Henrique Ramos
    Henrique Ramos over 1 year

    I use 14.04 and I don't have syslog.

    I'm a fresh user of Linux, being Windows user for years. When I try tail syslog and that's what out:

    henrique@henrique:/var/log$ tail -f /var/log/syslog
    tail: couldn't open “/var/log/syslog” for reading: File or directory not found
    

    Was that some error in installation of Ubuntu? Is that a way I can "install" syslog?

    EDITING:

    cat /etc/rsyslog.conf

    #  /etc/rsyslog.conf    Configuration file for rsyslog.
    #
    #           For more information see
    #           /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
    #
    #  Default logging rules can be found in /etc/rsyslog.d/50-default.conf
    
    
    #################
    #### MODULES ####
    #################
    
    $ModLoad imuxsock # provides support for local system logging
    $ModLoad imklog   # provides kernel logging support
    #$ModLoad immark  # provides --MARK-- message capability
    
    # provides UDP syslog reception
    #$ModLoad imudp
    #$UDPServerRun 514
    
    # provides TCP syslog reception
    #$ModLoad imtcp
    #$InputTCPServerRun 514
    
    # Enable non-kernel facility klog messages
    $KLogPermitNonKernelFacility on
    
    ###########################
    #### GLOBAL DIRECTIVES ####
    ###########################
    
    #
    # Use traditional timestamp format.
    # To enable high precision timestamps, comment out the following line.
    #
    $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
    
    # Filter duplicated messages
    $RepeatedMsgReduction on
    
    #
    # Set the default permissions for all log files.
    #
    $FileOwner syslog
    $FileGroup adm
    $FileCreateMode 0640
    $DirCreateMode 0755
    $Umask 0022
    $PrivDropToUser syslog
    $PrivDropToGroup syslog
    
    #
    # Where to place spool and state files
    #
    $WorkDirectory /var/spool/rsyslog
    
    #
    # Include all config files in /etc/rsyslog.d/
    #
    $IncludeConfig /etc/rsyslog.d/*.conf
    

    Output for apt-cache policy inetutils-syslog

    inetutils-syslogd:
      Installed: (nenhum)
      Candidate: 2:1.9.2-1
      Version table:
         2:1.9.2-1 0
         500 http://br.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
    

    Output for apt-cache policy rsyslog

    rsyslog:
      Installed: (none)
      Candidate: 7.4.4-1ubuntu2.6
      Version table:
         7.4.4-1ubuntu2.6 0
         500 http://br.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
            100 /var/lib/dpkg/status
         7.4.4-1ubuntu2.3 0
            500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
         7.4.4-1ubuntu2 0
            500 http://br.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
    

    Output for sudo service rsyslog status

    rsyslog stop/waiting
    
    • Admin
      Admin almost 9 years
      This log and couple of others should be controlled by a script /etc/rsyslog.conf. Can you look through that scrip and tell us whether syslog there is disabled or not. Or post the whole file to paste.ubuntu.com and we could take a look. Also syslog needs sudo to be viewed, try that same command with sudo.
    • Admin
      Admin almost 9 years
      @Serg tail -f /var/log/syslog does not require sudo to view it.
    • Admin
      Admin almost 9 years
      Edit your question and add the output of apt-cache policy inetutils-syslogd
    • Admin
      Admin almost 9 years
      shows "installed none" on my system but syslog is active ;)
    • Admin
      Admin almost 9 years
      @Rinzewind Is it really rsyslogd?
    • Admin
      Admin almost 9 years
      whats the output of ls /var/log/syslog* ?
    • Admin
      Admin almost 9 years
      I would assume so @a.b. ( /usr/sbin/rsyslogd exists)
    • Admin
      Admin almost 9 years
      Ok, than edit your question and add the output of apt-cache policy rsyslog
    • Admin
      Admin almost 9 years
      And edit your question and add the output of sudo service rsyslog status
    • Admin
      Admin almost 9 years
      @A.B. There, it is. I edited the post with the outputs you asked.
    • Admin
      Admin almost 9 years
      @Serg I posted the text of /etc/rsyslog.conf. It is on the edited post.
    • Admin
      Admin almost 9 years
      @heemayl The output is henrique@henrique:~$ ls /var/log/syslog* ls: couldn't access /var/log/syslog*: File or directory not found
  • Henrique Ramos
    Henrique Ramos almost 9 years
    Ah yeah, now it is on! Tks so much for your help.
  • A.B.
    A.B. almost 9 years
    No, there is nothing more to do.