Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Martin Gignac <martin.gignac@gmail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: How to troubleshoot (suspected) flowtable lockups/packet drops?
Date: Wed, 17 Mar 2021 23:28:54 +0100	[thread overview]
Message-ID: <20210317222854.GA24692@salvia> (raw)
In-Reply-To: <CANf9dFOHgb+QNqVkWVsnP6ALSQxbPzyv8xA0LXyck39w3bUjwg@mail.gmail.com>

On Wed, Mar 17, 2021 at 06:01:43PM -0400, Martin Gignac wrote:
> If I just run:
> 
>     nft list ruleset > rules.txt
> 
> add:
> 
>     flush ruleset
> 
> to the top of the file, add the:
> 
>     counter
> 
> statement to the flowtable section, and then:
> 
>     nft -f rules.txt
> 
> This should atomically add the "counter", but not impact traffic in
> any way, shape or form, correct?

It turns on packets and bytes counters:

# conntrack -L
tcp      6 src=10.141.10.2 dst=192.168.10.2 sport=57758 dport=5201 packets=1998758 bytes=87532896157 src=192.168.10.2 dst=192.168.10.1 sport=5201 dport=57758 packets=1966493 bytes=102257896 [OFFLOAD] mark=0 use=2

You also have to enable counters in conntrack:

echo 1 > /proc/sys/net/netfilter/nf_conntrack_acct 

  reply	other threads:[~2021-03-17 22:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 15:43 How to troubleshoot (suspected) flowtable lockups/packet drops? Martin Gignac
2021-03-16 23:05 ` Pablo Neira Ayuso
2021-03-17  1:37   ` Martin Gignac
2021-03-17 10:34     ` Pablo Neira Ayuso
2021-03-17 19:07       ` Martin Gignac
2021-03-17 20:42         ` Pablo Neira Ayuso
2021-03-17 22:01           ` Martin Gignac
2021-03-17 22:28             ` Pablo Neira Ayuso [this message]
2021-03-18  2:23               ` Martin Gignac
2021-03-18 16:20                 ` Pablo Neira Ayuso
2021-03-18 17:00                   ` Pablo Neira Ayuso
2021-03-18 17:24                     ` Martin Gignac

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=20210317222854.GA24692@salvia \
    --to=pablo@netfilter.org \
    --cc=martin.gignac@gmail.com \
    --cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox