Internode Usage meter for Conky

This is a rework of the script from Internet Usage Monitoring – conky style! But the only problem I found is that it not wanted to work with my NodeMobile account. So here is my rewrite of parts of the script to use the other Internode Usage API url.

One thing you need to find out for this script to work is the service number for the account you want to get the usage for. That can be easily obtained by pointing your web browser to and logging in.

This is old code please refer to

On the page is the number you need to add to ‘service=XXXXXXX’ in the scipt below

## Author:
## Quail <quail>
## Created on 8th April 2010.
## Licensed under the GPL version 3.

## Get usage information from Internode's web page.
## requires: curl and gawk

# Set the username, password and service number

# Grab the details
curl -s -u $id:$pw$service/usage >/tmp/usage.xml

# Process the usage.xml
rollover=`cat /tmp/usage.xml |sed -n 2p|cut -d"=" -f5|cut -d'"' -f2`
quota=`cat /tmp/usage.xml |sed -n 2p|cut -d"=" -f7|cut -d'"' -f2`
used=`cat /tmp/usage.xml |sed -n 2p|cut -d">" -f6|cut -d"< " -f1`

# Break up the values into their respective parts
echo "$used $quota" > /tmp/node-text.txt
echo "Used: `cat /tmp/node-text.txt | gawk '{print $1/1000/1000}'` MB Quota: `cat /tmp/node-text.txt | gawk '{print $2/1000/1000}'` MB Period Ends: $rollover" > /tmp/node-usage.txt

# Generate the percent used.
cat /tmp/node-text.txt | gawk '{print $1/$2*100}' > /tmp/node-graph.txt
percent=`cat /tmp/node-graph.txt`
echo $(printf %.0f $percent) > /tmp/node-percent.txt


Now make the script executable and run it from cron.

This how I have display the info in Conky

${color #5b6dad}Internode Usage: ${hr 1}
${color #7f8ed3} ${execi 900 cat /tmp/node-percent.txt}% ${execibar 900 cat /tmp/node-graph.txt}
${color #7f8ed3} ${execi 900 cat /tmp/node-usage.txt}

Comments (3)

  1. 2:06, Saturday, April 10, 2010Dale  / Reply

    I have created a page for the Node Usage for Conky here:

  2. 18:56, Sunday, October 30, 2011giovanni  / Reply

    any idea how to do the same thing with Bigpond?


    • 20:55, Sunday, October 30, 2011Dale  / Reply

      you’ll have to check out the API Bigpond have in place for handling this sort of thing. If you can’t find the info via there web site I suggest try emailing them to see if they can supply you with the info.

Leave a Reply

Pingbacks (0)

› No pingbacks yet.

%d bloggers like this: