SASacct is accounting package, used for collecting
traffic statistics using internal OS specific kernel counters or using SNMP.
SASacct invokes external program (ipfstat,ipchains,iptables or pfctl)
or querys remote SNMP agent and writes a logfile for the ip which is being monitored.
Using external program you have 4 options:
a) Linux 2.2.x with ipchains
b) Linux 2.4.x with iptables
c) OpenBSD using Daren Reed's ipf
d) OpenBSD >= 3.0 with pf
Any other *BSD system with ipf support can use SASacct.(tested on FreeBSD 4.4 with ipf).
Using SNMP you have 2 options for accounting:
a) query the router for byte counters for specific interface
b) if your router is cisco you can use the 'ip accounting' feature
and get a table with source and destination ip's and a byte counter
and extract the needed information.
For displaying the collected information sasacct has
cgi-script with username/password authentication which
can display the data on a per daily basis generating
on-the-fly graphics with bandwith utilization. It can
also generate static bandwith utilization graphics on 5
Information on how to configure SASacct is included
in the package.
How it works you can see here:
- ipchains,SNMP,ip accounting - username: demo password: demo
Sasacct was developed with perl 5.6.0.
Not tested on version lower than this.
The perl modules you need to install are:
CGI::Session - needed for the cgi script (www.cpan.org)
Net::SNMP (optional) - if you will query SNMP agents (www.cpan.org)
Net::Netmask (optional) - if you will query Cisco Routers with 'ip accounting' enabled (www.cpan.org)
RRDTool - available here.
That is how the graphics looks like:
Latest is 1.0.2
If you plan to use this program in an ISP environment or for
any commercial reason , or situation in which you rely on this program
for generating profits please read the COPYRIGHT
included in the tarball.
Thanks in advance for your suggestions.
Happy Hacking and Cheers
sasvirco at homemail dot com
$Id: index.html,v 1.1 2004/01/16 12:02:15 root Exp root $