Curl - http://curl.haxx.se/
Gawk - http://www.gnu.org/software/gawk/
These packages should be available in you distribution's repository.
And of course Conky and an active Internode account.
$ chmod 755 node-usage.sh
Add the following line to ~/.netrc
remember to change 'myself'(username)
and 'secret'(password)
machine customer-webtools-api.internode.on.net login myself password secret
$ echo "machine customer-webtools-api.internode.on.net login myself password secret" >> ~/.netrc
$ chmod 600 ~/.netrc
This is to make sure that the file is only readable by your account.
$ crontab -e
*/30 * * * * ~/programs/scripts/node-usage.sh
And it best not to have it updating anything less than 30 minutes.
${color #5b6dad}Internode Usage: ${hr 1}
${color #7f8ed3}${execi 900 cat ~/.config/internode/cache/node-percent.txt}% ${execibar 900 cat ~/.config/internode/cache/node-graph.txt}
${color #5b6dad}Used: ${color #7f8ed3}${execi 900 cat ~/.config/internode/cache/node-used.txt} ${color #5b6dad}Quota: ${color #7f8ed3}${execi 900 cat ~/.config/internode/cache/node-quota.txt}${alignr}${color #5b6dad}Days Left: ${color #7f8ed3}${execi 900 cat ~/.config/internode/cache/node-rollover.txt}
${color #5b6dad}Today: ${color #7f8ed3}${execi 900 cat ~/.config/internode/cache/node-today.txt}${alignr}${color #5b6dad}Remaining: ${color #7f8ed3}${execi 900 cat ~/.config/internode/cache/node-remaining.txt}
Conky is a free, light-weight system monitor for X, that displays any information on your desktop.
In theory anywhere you like under your home directory
You'll find them in your home directory under .config/internode/
These files are used to store the data that can be used in Conky.
Here is a break down of the files and what they used for:
node-curdayavg.txt
- The average you can use for the daynode-graph.txt
- percentage for producing the graphnode-left.txt
- Data you have left for the monthnode-percent.txt
- percentage of data usednode-quota.txt
- Monthly data quotanode-remaining.txt
- Usage left for the month + day averagenode-rollover.txt
- The date your account rolls overnode-today.txt
- Todays data usednode-used.txt
- Overall data used for the month
create an account directory in ~/.config/internode
and create a ~/.config/internode/account/.netrc
file.
Then execute the script like this node-usage.sh account