Technology

Cacti – Installing on Windows

Cacti is a great tool to graph network utilization. I discovered it during my previous job to create some utilization graphs of satelite links. I highly admire the talent of the kid maintaining this software… Cacti can be used by any organization wanting to graph network utilization. It is also flexible enough to graph other stats (disk utilization, CPU utilization.. etc.)

I used Linux for all of my previous installs of Cacti. The whole install is very well documented. My team is still not very Linux savvy and wanted to try Cacti out in a Windows environment. There is adequate documentation for installing Cacti on Windows, but I ran into several issues when following this guide. If I was starting all over again, I would rather try this documentation. It is more up-to-date and detailed. The author missed mentioning that you have to change the “DocumentRoot” value in the Apache conf file.. But that is a minor issue.

Am still having issues with the scheduler tool in Windows to run the poller every 5 minutes. The scheduled job is only running when someone is logged into the server. As soon as you log off the server, the scheduler seems to be stopping. I will post an update as soon as I fix this.

MSFT Windows : Offer Remote Assistance

My team uses the “Remote Assistance” functionality offered in Windows XP pretty extensively. One of the problems with the tool for the tech support personnel is that there is no easy shortcut to “offer” remote assistance. One has to launch remote assistance, search for “offer assistance” and then click on the link that shows up. Sounds easy, but if you are doing it 20 times a day, gets rather irritating :)..

Here is a trick to bypass the search.. Right click on your desktop and go to “New” –> “Shortcut”. Enter “hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/Unsolicitedrcui.htm” (without qoutes “”) into the location of the item box and hit next. Choose a name for the shortcut and click on Finish.

Double click on the shortcut and voila.. instant access to offering remote assistance :).

Microsoft related site

Looks like today is going to be a day of “Cool Sites” posts :). Here is a site maintained by Daniel Petri containing all sorts of MSFT articles. Daniel writes a lot of articles about issues that admins run into on a daily basis and he has some great practicle advice. Highly recommend visiting it regulary.

DNS Tools

Good site to do DNS queries from an independant node on the Internet. I use it a lot at work to check if DNS records have been updated. The site also has good tools to check on BGP, WHOIS etc.

Excel : Import tables from web pages

Ran into a bit of a tough nut the other day. One of my colleagues was trying to gather data from a HTML page and run some reports. He could scrape the page and copy the data into Excel, but any operations he tried on the data errored out. He tried every trick in the book (change format of columns etc) but it didn’t help.

A bit of googling and found this new cool function in Excel 2003.

Go to “Data –> Import External Data –> New Web Query” in Excel and you check on this new cool method.

“F1” in Excel rules :)..

IPSec – What is it??

This is a great write up by Stephen Friedl about the IPSec suite of protocols. Highly recommend reading it.

On a side note, I finally updated the Blogging software on the site. Have been getting a lot of “blogspam” from the entries on this site. It is just amazing how far the spammers go to NOT get their message :).

RRDTOOL – How to remove spikes

We use Cacti at work to graph the usage of our clients links. It is a pretty popular feature with our customers. A problem (well not really. More like a gotcha) with rrdtool is the way it stores data. Here’ a quote from the rrd tutorial
“Round robin is a technique that works with a fixed amount of data, and a pointer to the current element. Think of a circle with some dots plotted on the edge, these dots are the places where data can be stored. Draw an arrow from the center of the circle to one of the dots, this is the pointer. When the current data is read or written, the pointer moves to the next element. As we are on a circle there is no beginning nor an end, you can go on and on. After a while, all the available places will be used and the process automatically reuses old locations. This way, the database will not grow in size and therefore requires no maintenance. RRDTool works with with Round Robin Databases (RRDs).”

So rrd stores the difference in values (between the last value and current) in the database, rather than the value itself. This creates a problem when routers are rebooted. The counters on the interfaces get cleared and rrd is fooled into thinking that there is a spike in usage. This results to “spikes” in the graphs. Sometimes you see that a 128kbps link has maxed out at 98mbps!!! :). The best way to stop this from happening is to set the correct min and max values for the ds names. Coming back to cacti again. When cacti creates a new rrd database, it does not really give one the option to setup the maximum and minimum speeds of a interface. It defaults to a max of 100000000 (i.e. 100mbps). Occasionally when we have to reboot our routers, I do the following to remove the spikes

cp filename.rrd filename.rrd.backup
Any good admin knows that before you mess with a file, you make a backup :).

rrdtool info filename.rrd | more
This gives us the chance to get the ds (data sources) names

rrdtool tune filename.rrd -a ds_name:MAXIMUM_VALUE
Set the maximum of the ds to the required

rrdtool dump filename.rrd > filename.xml
Export all data in the rrd to a xml file

mv filename.rrd filename.rrd.old
Rename the rrd to make way for the new one.

rrdtool restore filename.xml filename.rrd -r
Restore the rrd from the xml file with the -r (range check) option. So any values that are higher than the new maximum value are ignored.

And the spikes are gone..

spam stats

While following this threat on slasdot, I came across this site by a system admin who tracks where the spam he fights on a daily basis originates from. This is further proof to break the myth of spamming that “Most spam originates from outside the US”. From this site, we can see that ~35% of spam originates from the US. I am not sure how the author is getting the country of origin from the IP address. I work at an ISP and know that even though all the IP addresses belong (are allocated) to us, they are all allocated to our customers (located outside the US). And we don’t SWIP them as we are required to :). So if any of our customers send out spam, for the rest of the world, it would look as if though it is originating from the US. Wonder how much of the 35% is made up of such spammers.

Server Move

I wanted to install Gallery so that I can easily share some of the “art” that I shoot :). The server I was on did not have some settings (it has php – safe_mode on) that stopped me from installing Gallery. The good people at 3-95.com , where I host this site, offered to move me to a new server that would allow me to install Gallery. So here we are on a brand new server. I will be posting some new pictures soon.