Thursday, January 27, 2005

Wednesday, January 19, 2005

Snowy weather

Yesterday afternoon it started snowing and it was so beautiful...

In the evening I took a nice and relaxing walk cross the snow covered place where I live (Trissino, BTW)...
The picture in the header was taken yesterday in the morning when it was 6 below and everything was white for the ice. See it in full here.

AHHHH, life smiles again!

Tuesday, January 11, 2005

Checking mysql replication

Question: What happens if you have two mysql database with replication, they stop replicating and you do not notice?
Answer: you get into trouble....

Here is a small script to help you stay informed...


#!/usr/bin/php
/* Connessione e selezione del database */
$connessione = mysql_connect("localhost", "root", "secretpw")
or die("Connessione non riuscita");
print "Connesso con successo\n";

/* Esecuzione di una query SQL */
$query = "SHOW SLAVE STATUS";
$risultato = mysql_query($query) or die("Query fallita");
$slaveok=0;

while ($row = mysql_fetch_array($risultato, MYSQL_ASSOC)) {
print "Slave is running: ".$row["Slave_Running"] . "\n";
print "Last error : ".$row["Last_error"] . "\n";
if ($row["Slave_Running"]=="Yes" && $row["Last_error"]=="") {
$slaveok=1;
}
}

/* Liberazione delle risorse del risultato */
mysql_free_result($risultato);

/* Chiusura della connessione */
mysql_close($connessione);

if ( ! $slaveok ) {
system("echo \"Check MYSQL replication on web1!\" | mail -s \"MYSQL replication on web1\" admin ");

?>


Monday, January 10, 2005

Crazy crazy weekend

So last week I managed to migrate the file server cluster and everything worked ok.
It was then time for me to take a break and relax... and luckily friday the 7th I was able to take a day off at work.
I worked hard all friday as a lumberjack and at the evening I was ready for some fun!
Friday night was spent enjoying a warming drink (called jager tee) in a pub and chatting with a friend of mine.
We then planned for Saturday to be more quiet, but could not resist groovy caipiroskas in cozy disco bar until 4am....

So here I am, Monday morning fighting computers as hard as I can! I need some coffeeeeee

Monday, January 03, 2005

Yesterday's dinner and good thought for 2005

Yesterday eve I went out with some friends of mine and as usual we ended up talking about computers and eventually boring to death my poor girlfriend who, in a desperate attempt to save her evening and good mood decided to get drunk (with no success at all I must say).

I proposed them to write an open source version of My Life Bits.

My good thought for 2005 is to develop (possibily useful ;-) ) open source stuff and give it away. I am currently working on a java implementation of mapserver.

Happy new Year Everybody!!