All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tarun Khanna <tkhanna@akamai.com>
To: Florian Westphal <fw@strlen.de>
Cc: <netfilter-devel@vger.kernel.org>
Subject: Re: per flow stats collection using libnetfilter_conntrack
Date: Thu, 9 Mar 2017 10:52:29 -0500	[thread overview]
Message-ID: <fa81dae5-06cb-8a5e-ae55-9d7619d1dc9e@akamai.com> (raw)
In-Reply-To: <20170309094038.GB17668@breakpoint.cc>


> Tarun Khanna <tkhanna@akamai.com> wrote:
>> On 02/27/2017 05:12 PM, Florian Westphal wrote:
>>> Tarun Khanna <tkhanna@akamai.com> wrote:
>>>> Is it possible to register for callbacks so that a user application is
>>>> updated on a regular basis when the packet or bytes counts change for flows?
>>> No, update to packet/byte count doesn't trigger an event (it would
>>> trigger too often).
>> I was hoping if there was an option to set a timeout, so that an update
>> would trigger every 5 seconds for flows where the counters have changed.
> No, there is no such feature at the moment.
>
>> I have an application that needs to keep track of per flow stats for all tcp
>> flows destined to port 80. The best way I have found so far is to call
>> nfct_query regularly and to go through each flow returned to retrieve the
>> counters. Would that be the best way to do it?
> Its your only option right now.  If you need a periodic update feature
> we'll need to think about how to best make this.
>
> We now have a periodic gc worker in conntrack so we could probably do
> this without re-adding a per-conntrack timer.

Thank you. The current way of polling works for me. I was thinking about 
it and it doesn't really make a difference if the library sends me 
updates periodically or if I check for them because in both cases I'll 
need to setup some event on epoll (either a timer or the netfilter fd). 
So, functionally both would be the same. Thanks again for your help.

      reply	other threads:[~2017-03-09 16:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 20:49 per flow stats collection using libnetfilter_conntrack Tarun Khanna
2017-02-27 22:12 ` Florian Westphal
2017-02-27 22:36   ` Tarun Khanna
2017-03-09  9:40     ` Florian Westphal
2017-03-09 15:52       ` Tarun Khanna [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa81dae5-06cb-8a5e-ae55-9d7619d1dc9e@akamai.com \
    --to=tkhanna@akamai.com \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.