Hello.
I've developed a daemon for monitoring network traffic. It is called yantd (Yet
Another Network Traffic Daemon) and is available at
http://github.com/joeroback/yantd
I would like to see yantd offered in the feeds/packages repository for the
OpenWrt community to use. The git repo contains the OpenWrt build system
Makefile. If a different organization of the repo is more convenient, I am
willing to organize it which way makes it easier for integration in the
packages repo.
The idea came from the ttraff daemon used in the dreaded dd-wrt firmwares. When
I started using OpenWrt I initially started using collectd but found it too
bulky and requires a web GUI to see the graphs.
Additionally, I have one of those ISPs that caps my monthly bandwidth at 250GB.
Collectd was hard to track my usage due to its rolling history.
yantd features:
(*) small on disk and in memory footprint
(*) init.d startup script
(*) UCI configuration, supporting any number of network interfaces
(*) can specify process niceness and I/O niceness via the UCI config
(*) command line interface
A file is used to store traffic data for each month. Each traffic file consists
of a 24 byte header and 16 byte (64-bit RX bytes and 64-bit TX bytes) * number
of days in a month.
Output from the command line interface looks like the following:
r...@router:~# yantd-cli
Usage: yantd-cli [-gkmtv] [-r start-end] <traffic file>
-g Output format Gigabytes
-k Output format Kilobytes
-m Output format Megabytes
-r Only shows days in range (e.g. 3-5 shows 3rd through 5th)
-t Output format Terabytes
-v Show version info
r...@router:~# yantd-cli -m -r 1-15 /mnt/stats/yantd/router-eth1-201007.dat
Day Received Transmitted Total
------ --------------------- --------------------- ---------------------
01 8038.4 MB 8038.4 MB 16076.8 MB
02 2833.0 MB 990.8 MB 3823.8 MB
03 2020.3 MB 1530.6 MB 3551.0 MB
04 349.4 MB 772.2 MB 1121.7 MB
05 1185.7 MB 171.8 MB 1357.6 MB
06 1527.6 MB 280.1 MB 1807.7 MB
07 2060.6 MB 1036.4 MB 3097.0 MB
08 3494.0 MB 1542.7 MB 5036.7 MB
09 2564.5 MB 713.1 MB 3277.6 MB
10 1487.0 MB 724.0 MB 2211.1 MB
11 0.0 MB 0.0 MB 0.0 MB
12 0.0 MB 0.0 MB 0.0 MB
13 0.0 MB 0.0 MB 0.0 MB
14 0.0 MB 0.0 MB 0.0 MB
15 0.0 MB 0.0 MB 0.0 MB
------ --------------------- --------------------- ---------------------
Totals 25560.7 MB 15800.2 MB 41360.9 MB
My current and future plans include:
(*) option to add packet, error traffic data (additional fields from
/proc/net/dev)
(*) optional ncurses interface (to be selected via menuconfig)
Regards,
Joe Roback
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel