February 6th, 2012

How I keep track of my bandwidth usage...

Since my current Internet Service Provider Reliance Communication has started cheating, I now keep an account of my bandwidth usage. Here's a script I use for every internet session:

filename: netusage.sh

date >>usage.txt
ifconfig ppp0|tail -n 2 >>usage.txt
ifconfig ppp0
if [ "$?" -ne "0" ]; then
cp usage.txt $( date | sed -e "s/://g" |sed -e "s/ //g").txt
rm usage.txt
sleep 180;
It takes a sample of usage every 3 minutes and when you are done, dumps your usage for the session in some file with name such as "SunFeb5044143IST2012.txt". Later you can grep, cut and sum all of your usage from all of the files for a particular period.

And if you are interested in some graph of your usage pattern, you cane even do that using some kind of regression or time series.

Other better ways are welcome.

A review of Russian Movie Konets Vechnosti (based on The End of Eternity by Issac Asimov):

There are Eternals and there is Eternity, a temporal field in spacetime which exists through centuries. The Eternity was created in the 24th century and does employ best minds from all of the centuries since then. It was supposed to be eternal but beyond a certain future they are blocked by some mysterious power/force. And if they travel beyond these hidden centuries, they find Earth, a barren planet & humanity completely extinct. For eternals, who can watch all of the past(since the creation of temporal field in 24th century) present and future, by travelling upwhen & downwhen within the Eternity, the hidden centuries are a setback. They do cause reality changes and then watch its effects in the future. Their mission is to create a perfect happy time for all of the humanity by minimising their suffering in all of the times. But their own time proceeds in a normal manner, they do age, and it is independent of the true reality's time changes.

In order to be really eternal all of spacetime must be closed in loop to Eternity's temporal field, but they can't. They suspect that Timers, from the hidden cenuries, are fast catching up with them and want to destroy their power to change humanity's fate (a fate which they see fit). But what could the Timers be plotting against them, and why would they not let a guardian organization oversee all of humanity's welfare. Probably the answer lies in Eternity's decision to delay and sabotage space travelling capabilities of Humanity. The timers are themselves plotting reality changes to delay humanity's inevitable extinction at the specified time...but what kind of plot.