Re: IP Acounting Idea for 2.5

Ton Hospel (linux-kernel@ton.iguana.be)
Fri, 20 Apr 2001 02:51:55 +0000 (UTC)


In article <E14pfQ3-0003bG-00@the-village.bc.nu>,
Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
>> > No he isnt confused, you are trying to dictate policy.
>>
>> What then *is* the policy?
>
> The policy is not to have policy. It works as well in kernel design as politics.
>
> Alan
>
Since my job is in fact mainly this kind of apps, i really feel strongly
about this.

Resettable counters are evil.

Having resettable counters may not sound like it, but it is in fact policy.
It forces all apps to add code to detect these resets (and then give
warnings/errors, since there is just no way to do anything sensible with
them), since ignoring them will seemingly cause up to 2**32 counts suddenly.

It is also doing something in kernelspace which can be done in userspace,
which is normally considered a big nono.

Proposal: have a snapshot command, that remembers the current value of a
counter. Then have two interfaces: one that shows the continuous counter
and one that shows the subtraction of the current value from the snapshot.
The first can be used by used by serious applications (don't have to
add code to give warnings about dataloss), and the second can be used by
users who want to watch the counters a bit to get a feel for what a rule
is doing.

I really think cisco got this right: from the commandline interface
you can reset counters, and watch them, the SNMP counters however just
keep going and going and going independently from this.

(I think this snapshotting belongs in the apps reading the counters
really, but if you really insist on a kernel based reset, this might be
reasonable).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/