Need some help here.
A month ago I bought a TP-LINK MR3420 Wireless 3G Modem which is capable to connect to the internet by connecting a USB dongle to it.
The Dongle is a Huawei E153 and works well.
Before I had the TP-LINK I connected the Dongle to My laptop and used an App called SurplusMeter to Log My 3G Data usage, it's an easy program and can set both the date of the month it starts as well as how much Data is in the package, 2.5 GB in My case, after that it gets throttled.
Now, I can see My usage in the Web based UI from the TP-Link but it's both a pain and if I switch of the router or there is a power outage it's lost and I don't know how much I used.
But, that data (received and send) is also in Safari's data Base which is in /Users/perry/Library/Caches/com.apple.Safari/Cache.db
(TP-Link status page gets updated automatically when open in Safari
Now, if I open Cache.db in HexEdit and search for :
var statistList = new Array(
I can see the data as follows :
var statistList = new Array(
19244286, 1780152, 18004, 20168,
0,0 );
The four numbers are recieved-send-packets received-packets send.
What I want is to have a script which search for var statistList = new Array( and then write the 2 numbers following it to a file which I then can use to display in Geektool and I also need it to update every 10-20 seconds.
Preferable in Kb, then Mb if bigger than 1024 Kb and then Gb after when applicable.
I am no good in writting a script like that, I tried many times to write small Applescripts but I always end up with nothing.
I know for somebody familiar with Applescript it should be easy.
Any help is greatly appreciated.
Cheers Perry
A month ago I bought a TP-LINK MR3420 Wireless 3G Modem which is capable to connect to the internet by connecting a USB dongle to it.
The Dongle is a Huawei E153 and works well.
Before I had the TP-LINK I connected the Dongle to My laptop and used an App called SurplusMeter to Log My 3G Data usage, it's an easy program and can set both the date of the month it starts as well as how much Data is in the package, 2.5 GB in My case, after that it gets throttled.
Now, I can see My usage in the Web based UI from the TP-Link but it's both a pain and if I switch of the router or there is a power outage it's lost and I don't know how much I used.
But, that data (received and send) is also in Safari's data Base which is in /Users/perry/Library/Caches/com.apple.Safari/Cache.db
(TP-Link status page gets updated automatically when open in Safari
Now, if I open Cache.db in HexEdit and search for :
var statistList = new Array(
I can see the data as follows :
var statistList = new Array(
19244286, 1780152, 18004, 20168,
0,0 );
The four numbers are recieved-send-packets received-packets send.
What I want is to have a script which search for var statistList = new Array( and then write the 2 numbers following it to a file which I then can use to display in Geektool and I also need it to update every 10-20 seconds.
Preferable in Kb, then Mb if bigger than 1024 Kb and then Gb after when applicable.
I am no good in writting a script like that, I tried many times to write small Applescripts but I always end up with nothing.
I know for somebody familiar with Applescript it should be easy.
Any help is greatly appreciated.
Cheers Perry