Wednesday, September 18, 2013

Manage log files from getting too big

Log files in Linux can be managed via the logrotate command (See man pages). If the log files start growing too big, it can be difficult to audit these log files.

Here is an example to create a new log file each week as the weekly cron (See man pages) service runs.

Following is an example where the cakephp application is installed. It will create a new file each week for 52 times before deleting the oldest file. Each file will be appended with a running number starting with "1". If the log file is missing, no errors will be printed/emailed and nothing will be done if the log file is empty.

Step 1: Create the configuration file

Create the file /etc/logrotate.d/cakephp with permission 644 (owned by root) and following contents;

/var/www/html/mymesyuarat/*/tmp/logs/*.log {
    rotate 52
    create 640 root root

Step 2: Ensure that the logrotate service is running.

The above configuration can be tested with the following command;

logrotate -s /tmp/logrotatestatus /etc/logrotate/cakephp

Monday, September 2, 2013

Maxis site not supporting Mozilla or Chrome

A sudden change in policy at Maxis, one of the main telco in Malaysia or is it just my network problem?

Either way, last Aug 2013, Maxis customer support just informed me to use Internet Explorer (IE) or they can help email my bills. They tried, but the bill never arrived.

Now in September, I still can't login to get my bills using Chrome or Firefox. But wait, I see an additional notice at their portal....interesting. I added a text bubble.

I guess they are expecting me to call them for help on my bills.

2 Sept. Just spoke to customer service. Seems their Firefox is able to login and the Firefox version 23.0.1 that I am using not current enough. Huh? Is there a newer version since as of today?

On Firefox version 23.0.1, have disabled pop-up blocker, block reported attack sites/web forgeries, nothing happens when I click the "login" button. Ran IE (finally) and the login button works. Still not working on Google Chrome and Firefox.

Anyone else with this problem?

Blog Archive