Re: Is accounting supported?

Hi Dan,

Just out of curiosity: where does the accounting information come from?
I see one possible solution using netfilter with ULOG target and the
ulogd daemon.

I guess when using ulogd there is always a certain lag between the
number of bytes transferred/received and the user defined maximum of
bytes transferred/received (probably enforced by PolicyKit). I don't
think that's a real problem and could be workaround if there isn't the
need to have exact numbers.

At least for PPP we can get traffic counts via ioctls.  I'd like to get
traffic counts for the other devices like ifconfig does, but last I knew
ifconfig got that by scraping /proc/net/dev which is just ugly.  We may
be able to get updated traffic counts from netlink somehow?

I tried to figure out how a generic solution would look like and the solution I found was the thing with the ULOG trick. The kernel interface to netfilter is netlink based and the ulogd daemon uses this API. Though I'm not so sure if the authors recommand to use this API. IRC the iptables API should not be used directly.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]