IP Acounting Idea for 2.5
Leif Sawyer <[email protected]>:
Quoted 25 lines
Quoted 3 lines
And that introduces errors in measurement. It also depends on how frequently an uncontroled process is clearing the counters. You may never be able to get a valid measurement.
This is true. Which is why application programmers need to write code as if they are not the only [ab]users of data.
Which brings me back to my point.
Don't force the kernel to uphold your local application requirements of stable counters.
Enforce it in the userspace portion of the code.
<subtopic>
Yes, you could extend the proc filesystem (ugh) with a flag that could be read by the ip[chains|tables] user app to determine if clearing flags were allowed. Then a simpleecho 1 >
/proc/sys/net/ipv4/counters_lockedor some such cruft. But I don't see this extension making into the standard kernel at this time. It just seems to be wasteful. </subtopic>
Quoted 7 lines
If you (at your site) really need this type of functionality, it's pretty darn simple to write a wrapper to ip[tables|chains] which silently (or not so) drops the option to clear the counters before calling the real version.
Besides, what would be gained in making the counters RO, if they were cleared every time the module was loaded/unloaded?
1. Knowlege that the module was reloaded.
2. Knowlege that the data being measured is correct
3. Having reliable measures
4. being able to derive valid statistics
....
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: [email protected]
Any opinions expressed are solely my own.