2005-11-18
Create relationship diagrams with Graphviz
I discovered this amazing article about a a program called Graphviz.
It produces stunning graphs, like this one:
I already see an opertunity for dynamic data in MySQL and using the Graphviz Perl module :)
It produces stunning graphs, like this one:
I already see an opertunity for dynamic data in MySQL and using the Graphviz Perl module :)
2005-11-14
Mandriva LE ADSL Fix for Telkom ADSL
I have noticed that on Mandriva LE, ADSL is a bit broken. Problems include DNS and routing info which is not correctly retrieved remotely.
I have done my own hack, so I hope some body else can find it useful.
First you will need to create two files:
File 1 : /root/bin/adsl-fix.sh
File 2 : /root/bin/adsl-monitor.pl
The following crontab can be added to the root user:
The above interval is set to run every 15 minutes. What will happen is that the program adsl-monitor.pl will check for the availability for the www.google.com site. If the operation times out, the DNS and routing table is corrected.
This solution might not work for every one. I still don't know if you have to maybe change the default gateway address? Maybe some one knows :)
Anyway - I hope this helps some one. In the mean time I will try to get a cleaner solution working.
Nico
I have done my own hack, so I hope some body else can find it useful.
First you will need to create two files:
File 1 : /root/bin/adsl-fix.sh
1 #!/bin/sh
2
3 echo 'nameserver 196.25.1.1' > /etc/resolv.conf
4 echo 'nameserver 196.25.1.9' >> /etc/resolv.conf
5
6 route add default gw 165.146.64.1 dev ppp0
7 route del -host 165.146.64.1
File 2 : /root/bin/adsl-monitor.pl
1 #!/usr/bin/perl
2
3 my $statuscmd = "/usr/bin/HEAD -t 30 www.google.com | /usr/bin/head -1";
4 my $statusres = `$statuscmd`;
5 chomp( $statusres );
6 $statusres =~ /(\d+)/;
7 if( $1 == 200 ) {
8
9 print "Test web site status OK.\n";
10
11 } else {
12
13 print "Reloading ADSL settings...";
14 my $res = `/root/bin/adsl-fix.sh`;
15 print " DONE.\n";
16
17 }
The following crontab can be added to the root user:
*/15 * * * * /root/bin/adsl-monitor.pl
The above interval is set to run every 15 minutes. What will happen is that the program adsl-monitor.pl will check for the availability for the www.google.com site. If the operation times out, the DNS and routing table is corrected.
This solution might not work for every one. I still don't know if you have to maybe change the default gateway address? Maybe some one knows :)
Anyway - I hope this helps some one. In the mean time I will try to get a cleaner solution working.
Nico