Saturday, July 5, 2008

Planets fading into the sunset

The evening sky has been graced by the sight of Saturn and Mars over the previous months and as the two slowly fade into the glare of sunset they are making one last beautiful show with the Moon and with each other. On July 5th and 6th Mars and Saturn create a beautiful group next to the crescent Moon and they slowly move closer to each other until Thursday July 10th when they are separated by a mere 0.7 degrees, slightly more than width of a full Moon. Mars, being much closer to Earth than Saturn, appears to move a small amount to the east each evening and has been gradually drawing closer to Saturn. It's quite a finale to see these two worlds so close to each other from our point of view. By month's end they will be nearly out of sight.

The U.S. of A at 24 Frames Per Second: 200 American Movies Movie-Obsessed Americans Should See

Of course, July 4th has just passed, so I thought I would serve my country in the best way I know how: by talking about our movie heritage. More specifically, I have decided to list 200 important films that I feel best represent the true nature of America, warts and all. I won't bore you with a long intro--I'd rather you read about the movies than subject you to some wind-bagged soliloquy on our

The U.S. of A at 24 Frames Per Second: 200 American Movies Movie-Obsessed Americans Should See

Of course, July 4th has just passed, so I thought I would serve my country in the best way I know how: by talking about our movie heritage. More specifically, I have decided to list 200 important films that I feel best represent the true nature of America, warts and all. I won't bore you with a long intro--I'd rather you read about the movies than subject you to some wind-bagged soliloquy on our

vi vim cheat sheet

Gnucash

GnuCash is accounting and financial software.



Go to http://www.gnucash.org/ for more information regarding it and its features.

For now install it with
apt-get install gnucash gnucash-docs

Friday, July 4, 2008

Tuesday, July 1, 2008

Cacti on Freebsd

cacti is a very useful tool for monitoring your devices on network.

While there are many tutorials on installation and use of cacti this tutorial aims on providing just enough information to make installation work and graphing possible.

Cacti requires that the following software is installed on your system.

* RRDTool 1.0.49 or 1.2.x or greater
* MySQL 3.23 or greater, 4.1.x or 5.x or greater
* PHP 4.3.6 or greater, 5.x greater highly recommended for
advanced features
* A Web Server e.g. Apache

On you freebsd box
# cd /usr/ports/net/cacti
# make config
enable plugins
# make && make install

This will take care of all the packages it requires like

* apache
* rrdtool
* net-snmp
* php5-extensions
* php5 (With MySQL and SNMP Support)
* mysql server

To start snmp, apache and mysql in every reboot type
# echo 'snmpd_enable="YES"' >>/etc/rc.conf

# echo '/usr/local/libexec/mysqld --user=mysql &' >> /etc/rc.conf
# echo '/usr/local/sbin/apachectl start' >>/etc/rc.conf


To configure your snmp run the following command
# snmpconf

If you are installing mysql for the first time then
# chown -R mysql:mysql /var/db/mysql

For Apache 2.x
You should make sure that the following line is present in your httpd.conf file.

LoadModule php5_module libexec/apache/libphp5.so


In httpd.conf itself

<IfModule mod_dir.c>
<IfModule mod_php3.c>
<IfModule mod_php5.c>
DirectoryIndex index.php index.php3 index.html
</IfModule>
<IfModule !mod_php4.c>
DirectoryIndex index.php3 index.html
</IfModule>
</IfModule>
<IfModule !mod_php3.c>
<IfModule mod_php5.c>
DirectoryIndex index.php index.html index.htm
</IfModule>
<IfModule !mod_php4.c>
DirectoryIndex index.html
</IfModule>
</IfModule>
</IfModule>


Or you can simply have

DirectoryIndex index.php index.html index.htm


Finally add these two lines

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps


Add an alias for your cacti.

For eg: if you have your cacti setup on /usr/local/share/cacti then add an alias with

Alias /cacti /usr/local/share/cacti

Alternatively you can configure symbolic link too.

Now configure Mysql
First set root password
# mysqladmin --user=root password newpassword
# mysqladmin --user=root --password reload

Create a database for cacti
# mysqladmin --user=root --password create cacti

Import the default cacti database
# mysql cacti
Create a mysql username and password for cacti
# mysql --user=root --password mysql
mysql> Grant all on cacti.* to 'cactiuser'@'localhost' identified by 'password';

Edit the file include/config.php to reflect the current database changes.

Edit your crontab
# crontab -e
*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&
1

Open your browser and access http://thewebser/cacti

This completes the instllation.

Creating graph, graph template, host template and other useful stuffs will be covered in next part of the tutorial.
I have data template and graph template for
Proxim wireless device like Tsunami showing SNR, signal and noise.
Deliberant wirelss device showing RSSI and channel.