Log Rotate and *NIX

This has changed since my days at Pyramid. There has been quite a lot of thinking and engineering about dealing with daemon logs. The places to look are via the syslogd, newsyslog project, you can see a the newsyslog man pages and using the keyword “rotate log”. The idea is that logs are rotated, although the names are not and that old logs are deleted. So the newest is called mypackage or mypackage.0 and the older logs increment the counter. Logs are generally kept in /var/log or /var/log/package_name and not in the package or product install tree. What a nob? There is a command ‘logrotate’; it can be installed using macports. It needs a a configuration file.


Or Liunux/MacOS out of the box, I found these pages

Batch Programs

I have a problem today, I want to run a script periodically, on a laptop which will create a run log and I want to keep the logs tidy but each run is to have one log. I think I’ll write a function file since newlog is designed for daemons and I would need to manage the problem that my run needs to test the target log is empty before writing. I think I’ll refactor my functions to use logrotate.

Related Posts

  • Upgrading MacOS X And on to 10.9 There was a rumour that it was best to stop at 10.8, Mountain Lion but […]
  • Ubuntu 13.10 I am installing this on the Mac under Virtual Box. This snip is about Ubuntu. The […]
  • EXIF and MacOS X I have listened to Stop 43, and the British Journal of Photography I have read what Tim […]
  • Snipsnap & Ubuntu Install Snipsnap I decided to test an install of Snipsnap on my favourite Linux. I am […]
  • Shell Programming This page never seems to age, it just contains some idioms I like to use in my .login […]

One thought on “Log Rotate and *NIX

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.