Wednesday, March 06, 2013

Internode quota from the Ubuntu command line

I have an Internode ADSL connection and I'm running Ubuntu Server (12.04). I wanted to be able to check my internet quota from the command line and i found a perl script to help do that, but there weren't quite enough instructions there for me to make it work. It wasn't too hard to fix though:

$ wget
$ chmod +x internode-quota-check
$ mv internode-quota-check
$ sudo apt-get install libwww-mechanize-perl libreadonly-perl
$ ./ man
you don't seem to have a ~/.fetchmailrc, so I'll prompt you.
To avoid extra dependencies, your password will be echoed.
Username: juliusroberts
Password: passwordhere
Run this command to create a ~/.fetchmailrc file:
echo '# poll user "juliusroberts" password "passwordhere"' >> ~/.fetchmailrc
$ echo '# poll user "juliusroberts" password "passwordhere"'>> ~/.fetchmailrc
$ ./
juliusroberts: 132.032 GB (88.0%) and 13.6 days (48.5%) left on 150 GB, 24 Mb/s plan.

So I then went and added  ./ to the bottom of my ~/.bashrc file.  So now when i login to my server i see straight away how much internets i have left, yay :)

No comments: