[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Counting bytes to/from alias IPs on 3.0
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Counting bytes to/from alias IPs on 3.0
- From: "Richard Johnson" <rdump_(_at_)_river_(_dot_)_com>
- Date: Thu, 7 Feb 2002 10:09:41 -0700
For accounting purposes, I need to count bytes sent to and from particular
IPs, all of which are aliases on one interface. netstat -bi gives me the
upper bound, listing the total through the interface for each alias.
However, the kernel doesn't keep per-alias stats, and I need separate
counters for each alias IP.
One possible solution is to have pf log the packets, and parse pflog0 for
the packet lengths (I previously used count rules in ipfilter to do
A better solution might be to use a generic listener on the interface to do
Can anyone suggest a more elegant solution for a 3.0 box? Or, can anyone
perhaps point me to existing code implementing a generic byte counting