Re: Is accounting supported?
- From: Daniel Wagner <wagi monom org>
- To: Dan Williams <dcbw redhat com>
- Cc: networkmanager-list gnome org
- Subject: Re: Is accounting supported?
- Date: Sun, 17 Jan 2010 17:15:27 +0100
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.
daniel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]