Saturday, November 29, 2008

HELP FOR THE VICTIMS OF THE FLOODINGS IN BRAZIL. My 8 miles race challenge!!

Hi All

I am going to be running 8 miles in the mud on Saturday 6th December
to raise money for the victims of the flooding in the south of Brazil
(in my home state Santa Catarina). The flood has claimed more than 109
lives and left more than 80000 people without homes, food or water. The situation is overwhelming, people really need help now!!!



For more details of the challenge I have set myself see:
http://www.grimchallenge.co.uk/
For more information of the Brazilian flooding:
http://news.bbc.co.uk/1/hi/world/americas/7753744.stm
http://english.aljazeera.net/news/americas/2008/11/20081129101739685948.html




Update:

 If you woul like to donate directly, please use the bank accounts in brasil provided in the civil defense page:






I decided to do this only 2 days ago. I was going to do a donation myself, then I thought: "I think I could get more people to help", and then a friend of mine told me she couldn't run in the race as she got injured, my chance then, I set-up this separated account in my bank, sent an email around the work asking for sponsorship, and now I make this request online, to anyone who would like to help. I consider myself a relatively fit person :) But I think 8 miles (13 kms) on the mud won't be an easy job, so I started training harder at the gym since yesterday. I did 4 kms yesterday, not too bad for the first day. Now I will try to increase 2 kms every day, so being very optmistic by tuesday/wednesday I would be reaching the necessary 13 kms!!! :) Then put a huge pond ont he top of it, and you've got a real challenge. I'm totally sure it will be worth it to help my countryman in need!!!

Map with cities and roads affectted:

Thanks
Emerson Cargnin

Thursday, November 06, 2008

TOMCAT LOGS: Rotating catalina.out on a solaris box

I tried several different solutions for getting a rotated log on tomcat. I tried configuring a new tomcat.log and putting log4j and commonslog jars inside common/lib, but that just created a new log. When I thought I would have to live with the endless catalina.out, I tried logadm, which with a few configurations actually worked just as I wanted!!!

So here it goes.

1) In a directory which the user you are running tomcat can write create a file called logadm.conf with the following content (assuming tomcat is in the /opt/tomcat/ folder):

/opt/tomcat/logs/catalina.out -C 15 -c -t '/opt/tomcat/logs/$basename.%Y-%m-%d'

2) Create a cron job for the same user (assuming you saved the configuration in /opt/tomcat/logrotate):

You can add the cron entry to the user that is running tomcat in the following way:

export EDITOR=vi
crontab -e

add the line:

0 0 * * * logadm -f /opt/tomcat/logrotate/logadm.conf

This will make it run every midnight of everyday.
  • Explanation on the parameters of logadm

This command, that exists since the solaris 9, will rotate the catalina.out, will rotate the specified log file. The -C tells how many old copies of the files will be kept. The -c is the secret here. It will truncate the log file instead of renaming. This way tomcat keeps the handle to the file and can keep logging. -t uses a template to create the rotated files. Without that it will just append a .1, .2, etc.

You should run it manually before adding to your crontab.

That should be all!!!!