Re: Is accounting supported?

On Wed, 2010-01-13 at 08:09 +0100, Daniel Wagner wrote:
> On 01/07/2010 05:27 PM, Dan Williams wrote:
> > On Thu, 2010-01-07 at 08:18 +0000, Alex Buell wrote:
> >> On Wed, 2010-01-06 at 22:51 -0800, Dan Williams wrote:
> >>> On Tue, 2010-01-05 at 14:31 +0530, Elison Niven wrote:
> >>>> Hi List,
> >>>>
> >>>> I am using Network manager with Gnome network applet on Fedora 12.
> >>>>
> >>>> Are there any options for getting accounting like information about connect
> >>>> times, data bytes in and out etc?
> >>>
> >>> Not yet, but I've been trying to get somebody interested in doing the
> >>> feature since I'm swamped with a bunch of other stuff at this point.  It
> >>> shouldn't be too bad; we just keep a sqlite database around of all
> >>> connection start/stop/bytecounts and then expose that as a D-Bus
> >>> interface that applets can read.  Either somebody needs to step up or I
> >>> guess just wait until I get around to it.
> >>
> >> I'd like to volunteer to do this. I'll get around to it over the weekend
> >> and send you patches if you like. All I need is a list of desired
> >> features and I'll implement it. Just my way of contributing to NM!
> >
> > Excellent!  I put a summary of what I think should be done here:
> >
> >
> >
> > Does the stuff in Comment #3 sound doable?  You don't have to do
> > everything at the start but we can do it incrementally.  Like you don't
> > need to populate the "user-id" and "user-name" fields yet, since we need
> > to do a bit more internally to NM to store that information in the
> > NMActRequest structure (by pulling the uid off the D-Bus request to
> > start the connection).
> >
> > Let me know if you have any questions.
> 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?


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