February 23, 2006
Monitoring Bluetooth Data Usage, part II
I decided that figuring out how to automate the date stuff was too much work, so I rewrote the command to report the data transfered info per entry. And I now convert it to kb.So now it looks like this:
[DuffyPB867:/var/log] johnh%zgrep Sent ppp.log* | awk '{print $8,$11,$2,$3,$5}' | awk '{ sent = $1; rcv =$2; tot=sent+rcv; print $4 $3 $5 " sent: " sent/1024 "kb received: " rcv/1024 "kb Total: " tot/1024 "kb" }'
Which produces output like this:
23Feb2006 sent: 30.3799kb received: 214.044kb Total: 244.424kb
23Feb2006 sent: 602.885kb received: 3060.03kb Total: 3662.91kb
23Feb2006 sent: 81.6777kb received: 152.392kb Total: 234.069kb
18Jan2006 sent: 299.905kb received: 2431.14kb Total: 2731.04kb
18Jan2006 sent: 139.606kb received: 1301.67kb Total: 1441.27kb
19Jan2006 sent: 189.337kb received: 1056.86kb Total: 1246.2kb
I should note that this script doesn't check the ppp log for the *type* of connection, so if you also use your dialup modem (what's dialup?), then this won't work for you.
Posted 4 years, 11 months ago on February 23, 2006
The trackback url for this post is http://blog.john-hayes.com/bblog/trackback.php/166/
The trackback url for this post is http://blog.john-hayes.com/bblog/trackback.php/166/
SQL/DB Error -- [Got error 127 from table handler]
Warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/hayes/bblog/inc/bBlog.class.php on line 707
Warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/hayes/bblog/inc/bBlog.class.php on line 715
Warning: Variable passed to each() is not an array or object in /Library/WebServer/Documents/hayes/bblog/inc/bBlog.class.php on line 965
Comments have now been turned off for this post