mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harald Welte <laforge@gnumonks.org>
To: "Manfred Bartz" <md-linux-kernel@logi.cc>
Cc: linux-kernel@vger.kernel.org
Subject: [Counters] Re: IP Acounting Idea for 2.5
Date: Fri, 20 Apr 2001 13:28:19 -0300	[thread overview]
Message-ID: <20010420132819.C2461@tatooine.laforge.distro.conectiva> (raw)
In-Reply-To: <BF9651D8732ED311A61D00105A9CA3150446D9FF@berkeley.gci.com> <20010417011320.7149.qmail@logi.cc>
In-Reply-To: <20010417011320.7149.qmail@logi.cc>; from md-linux-kernel@logi.cc on Tue, Apr 17, 2001 at 11:13:19AM +1000

On Tue, Apr 17, 2001 at 11:13:19AM +1000, Manfred Bartz wrote:

> I had a brief look at MRTG.  It seems to be a well written app and
> while it can handle counter reset (with potential loss of an unknown 
> amount of data), it does not actively reset counters.  It also doesn't
> use iptables.

Yes, that's the whole point. If you want to have some kind of per-ip / 
per-network accounting, I'd rather recommend using something else
(i.e. an accounting module attaching to the netfilter hook itself,
something using the ULOG target to do the logging in userspace, ...)

Just reading out the per-rule counters always introduces problems as soon
as your ruleset changes. And when do you have a really static ruleset?
There are always new services/... to configure.

> Agreed too.  Counters should not arbitrarily be equipped with a reset
> capability, there is hardly any benefit in that and it causes nothing
> but problems.

so what about iptables-save at shutdown time and iptables-restore at 
bootup time? Then you can have your counters persist even after kernel
upgrades / reboots / crashes / ... 

> As far as I can see, the counters in /proc/net/snmp don't have a
> reset, same with /proc/net/dev and possibly other counters elsewhere.

Yes, because it is per network device, not per some arbitrarily inserted
rule which can be changed all the time. As I've stated more than once
in this thread, and as you just continue to say: just delete and re-insert
the rule, and you have your counter reset.

> Ideally iptables would fall in line with that.  Rules can still be
> unloaded and reloaded, also causing counter reset and loss of data,
> but since that is a lot more involved, application authors would have
> an incentive to handle counters properly.

I don't think that the iptables kernel part should remove some feature
just because there are application programmers wrongly designing their
applications.


> Manfred Bartz

-- 
Live long and prosper
- Harald Welte / laforge@gnumonks.org                http://www.gnumonks.org
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M- 
V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)

  reply	other threads:[~2001-04-20 16:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-16 22:35 Leif Sawyer
2001-04-16 23:42 ` Ian Stirling
2001-04-17  1:13 ` Manfred Bartz
2001-04-20 16:28   ` Harald Welte [this message]
2001-04-17 10:34 ` Olaf Titz

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=20010420132819.C2461@tatooine.laforge.distro.conectiva \
    --to=laforge@gnumonks.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=md-linux-kernel@logi.cc \
    /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

all inboxes | Powered by JetHome®