View Single Post
EmaNymton's Avatar
Posts: 141 | Thanked: 267 times | Joined on May 2010 @ Germany
#401
I wrote a little script to show the used traffic, have fun!

Edit: Forgot to mention that python-gconf must be installed.
Edit2: The script could be optimized, especially the format of the shown digits depending on the values and maybe changing the string color to red, if a predefined value is going to be exceeded.
I have not much time today, but will try it tomorrow...

Code:
#!/usr/bin/python
#-*- coding: utf-8 -*-

import gconf
import sys

client = gconf.client_get_default()
tx_bytes = client.get_string('/cellui/settings/datacounter/transfer/gprs_home_tx_bytes')
rx_bytes = client.get_string('/cellui/settings/datacounter/transfer/gprs_home_rx_bytes')
output_string = "up: {tx:03.2f} MB, down: {rx:03.2f} MB".format(tx=float(tx_bytes)/1000000,
                                                          rx=float(rx_bytes)/1000000)
sys.stdout.write(output_string)
Attached Images
 

Last edited by EmaNymton; 2012-12-31 at 13:00.
 

The Following 5 Users Say Thank You to EmaNymton For This Useful Post: