sqliteipcad is IP accounting daemon with Cisco-like ip accounting export. It runs in background, listens traffic on the specified interfaces, and records the traffic for later retrieval and analysis.

Here is a piece of shell code that allows to export ipcad output into sqlite3 database format:

echo "create table traffic (src, dst, pkt, bt);" | sqlite3 /tmp/throttle.db
rsh show ip accounting | grep "^ " | grep -vi source | awk \
'{print"insert into traffic values (\""$1"\",\""$2"\",\""$3"\",\""$4"\");"}' \
| sqlite3 /tmp/throttle.db

To make this working ipcad should be configured not to capture ports and to enable rsh service. In my case ipcad has the following settings set in ipcad.conf:

capture-ports disable;
interface eth0;
rsh enable at;
rsh admin;
rsh ttl = 3;
rsh timeout = 30;
pidfile = /var/run/ipcad.pid;
memory_limit = 100m;

and output (rsh show ip accouting) is like:                 113241           166387462                  72117             4282846                2448              821095                  3995              697371

The main problem is that it sqlite3 is rather slow and it takes eleven (11!!!) seconds to export 1000 entries of ipcad’s output into database. This was got at PC with 1.4Ghz CPU and 512Mb RAM.

If anybody knows how to get it faster, PLEASE LET ME KNOW! Thanks.

Information Improvisation: Traffic Engineering Server is new Solution for Bandwidth Management and QoS. It’s especially suitable for Broadband ISPs and SMEs.




  1. October 14, 2009  7:23 pm by stealth Reply

    I use ipcad + mysql = work fastest

  2. December 31, 2010  10:21 pm by black leather purse Reply

    Well. Not rather what I expected, but you've created me assume about this topic from yet another perspective. Good job.

  3. March 30, 2012  5:20 pm by fruit mocking party Reply

    Woah! I'm really loving the template/theme of this website. It's simple, yet effective. A lot of times it's tough to get that "perfect balance" between usability and visual appeal. I must say you have done a superb job with this. Also, the blog loads super quick for me on Internet explorer. Superb Blog!

  4. June 22, 2012  3:10 pm by Ollie Mantz Reply

    certainly like your web site but you have to check the spelling on several of your posts. Several of them are rife with spelling issues and I find it very bothersome to tell the reality however I will surely come back again.

Leave a reply


Your email address will not be published.