2

Trying to cat /var/log/daemon.log doesn't produce any output, while cat /var/log/daemon.log.1 does. Why do daemons store logs to the /var/log/daemon.log.1 file instead of /var/log/daemon.log? Is there a specific reason they are storing on the other file?

NOTE: ls -l /var/log shows both of those files have the same permissions and both are owned by a user called admin

5

The *.1, *.2.gz, etc. files are generated by logrotate, normally invoked by cron once a day IIRC. logrotate is designed to prevent log files from getting too large. It gzips the file after "1". Programs won't write to the *.1, etc. files on their own.

Are you sure that /var/log/daemon.log.1 is receiving new data? What's the timestamp of the last line in the file?

It sounds like your syslog process is not running or has crashed. Did you run out of disk space?

  • Hey, thank you for the answer, there is a /var/log/daemon.log.2 file too. I am not running out of space on the computer i noticed this behavior. However, I am now using another computer, again with Ubuntu 12.04 as the main OS, and I noticed that it doesn't have a /var/log/daemon.log at all. – NlightNFotis Sep 2 '12 at 15:29
  • Well, I'm using Debian, of which Ubuntu is a derivation. Perhaps Ubuntu is using something different with logging now. – LawrenceC Sep 2 '12 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.