Hi all,
A quick and dirty Munin plugin I currently use to monitor my traffic
consumption: http://is.gd/2tUKFM
I have a limited plan (3GB) on an USB 3G stick (ppp0 interface), better
to monitor it.
I store the ppp0 RX and TX traffic in a SQLite3 database in a 5 min
basis with a cron:
*/5 * * * * \
sqlite3 /home/mihamina/accouting \
"INSERT INTO ifconfig VALUES(NULL, DATETIME('NOW') \
$(/sbin/ifconfig ppp0 | sed 's/:/ /g' \
| awk '/RX bytes/{print ",", $3, "," ,$8, ")"}')"
Need to store the counters in a persistent way because when
deconnecting/reconnecting, counters reset.
I realized later there was an easier way by parsing /proc/net/dev
instead of parsing ifconfig output. I'll switch to that later.
I'll blog it later too... :-)
--
RMA.
--
Caml-list mailing list. Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs