Posts Tagged “logrotate”

Earlier today while investigating the logs on a CentOS Linux server I noticed the btmp file had grown to over 5GB. I was curious to look into the log and when attempting to read the 5GB file using last I received an error since last will only handle files that are 2GB in size or less. So what needs to happen is to split the file into multiple pieces so they can be read via the last command. Below I describe the error in detail, how to resolve it by splitting the btmp file into multiple files, and then how to join them together if you need to read logs older than the last split file.

Read the rest of this entry »

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , , , , , , , , , ,

Comments No Comments »

Working on a friends server earlier this morning I noticed that he had logrotate configured but he did not have a configuration file for Postfix. Below is the quick one I whipped up for his environment including a brief explanation of each line of the configuration file below the script. Following the explanation of the various configurations is the command to actually force logrotate to run in debug mode so you can see what happens.

Read the rest of this entry »

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , , , , , , , , , ,

Comments No Comments »

If you have the resources (CPU + RAM) available on your server then its can be a great troubleshooting tool if you enable MySQL logging which includes server messages, SQL query logs, and slow query logs. If you do not have the resources I would suggest only enable minimal logging such as only server messages and the slow query log since enabling all queries to be written to a file can become expensive rather quickly. Below I discuss enabling three different types of MySQL logging, adding a MySQL configuration file to logrotate, and configuring root to run mysqladmin commands without having to type the password out each time.

Read the rest of this entry »

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , , , , , , , , , ,

Comments 20 Comments »

The btmp log keeps track of failed login attempts. I have seen on a default linux setup with logrotate configured where the btmp log is left out of rotation and eventually grows out of hand. So first you want to make sure that the btmp log is rotated using logrotate with the below information.

Log Location:/var/log/btmp

To rotate the btmp log add the below to the logrotate.conf file located in the /etc directory.

Read the rest of this entry »

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , , , , , , ,

Comments 25 Comments »

I recently started using Redmine for numerous projects and could not be happier with the application so far. Not only is it actively developed and already includes a ton of great features but it doesn’t seem bloated at all. Many of the projects I have configured for Redmine have their code base stored on Github so I needed to find a way to add code updates that referenced tickets to the tickets themselves. At first I was having a bit of trouble understanding exactly how this should be achieved but after digging around it ended up being pretty easy. You will need to configure local repos underneath your Redmine project that are updated fairly regularly and then after they are updated you will need to run a script that updates the any ticket that code has been associated with.

Read the rest of this entry »

DeliciousStumbleUponDiggTwitterFacebookRedditLinkedInEmail
Tags: , , , , , , , , , , , , , , ,

Comments No Comments »