Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Daniel Chemko <dchemko@smgtec.com>
To: rohit persaie <persaie@hotmail.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: related to -z option
Date: Wed, 10 Mar 2004 11:02:47 -0800	[thread overview]
Message-ID: <404F6657.4020101@smgtec.com> (raw)
In-Reply-To: <BAY12-F12shalxyPyF10000278a@hotmail.com>

If you have an accouting tool which doesn't handle accumulative 
statistics gathering, you will have to zero the counters right after the 
probe. Not ideal, but a hack to make some acocunting packages work.

Eg:
I probe an ipables rule ever 5 min.


Minute 0
    iptables -Z
    iptables -nvxL | grep ... | awk '{print $2}'
    5345
    iptables -Z
Minute 5
    iptables -nvxL | grep ... | awk '{print $2}'
    5454
    iptables -Z
Accounting with a non-acumulative counter == 5345,5454
Accounting with an acumulative counter == 5345,109 (wrong)


Minute 0
    iptables -Z
    iptables -nvxL | grep ... | awk '{print $2}'
    5345
Minute 5
    iptables -nvxL | grep ... | awk '{print $2}'
    10799
Accounting with a non-acumulative counter == 5345,10799 (wrong)
Accounting with an acumulative counter == 5345,5454


rohit persaie wrote:

> Dear All,
>
> There is one option in iptables .....-Z , used for  the  packet  and 
> byte counters in all the chains.
>
> Please tell me the use of this option, with example.
>
> with regards ,
>
> persaie
>
> _________________________________________________________________
> Take a loan. Win great prizes! Handsome prizes to be won!  Take a loan 
> & win TV, Fridge & many more prizes ! 
> http://go.msnserver.com/IN/44044.asp
>
>


      parent reply	other threads:[~2004-03-10 19:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-10 11:47 related to -z option rohit persaie
2004-03-10 18:55 ` Antony Stone
2004-03-10 19:00 ` [despammed] " Andreas Kretschmer
2004-03-10 19:02 ` Daniel Chemko [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=404F6657.4020101@smgtec.com \
    --to=dchemko@smgtec.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=persaie@hotmail.com \
    /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