#1 make count data persistent across restarts

closed
nobody
None
5
2003-11-10
2003-10-12
Hannes Reich
No

This patch to version 1.1.4 adds the ability to
remember the total traffic counts across restarts of
the program due to reboots, power cuts, drunk people
tripping on cables, etc.

This is useful, for example, when using bandwidthd to
track download quotas on a DSL connection.

bandwidthd already can already log all the relevant
data to a CDF file, so this patch just adds some code
to read back the same CDF file on startup.

This functionality is enabled by adding the line
recover_cdf true
to the bandwidthd.conf file.

Disclaimer: I've tested this on a single subnet with 5
machines, and It Works For Me (TM). Let me know if it
doesn't work for you.

You have my permission to use and distribute the
attached patchfile for
any purpose and to anyone under whatever conditions you
see fit. If you consider it useless bloat and decide to
ignore it, you have permission to do that also ;-)

Discussion

  • David R Hinkle
    David R Hinkle
    2003-10-14

    Logged In: YES
    user_id=863707

    Neat patch, I'll take a look at it.

     
  • David R Hinkle
    David R Hinkle
    2003-11-04

    Logged In: YES
    user_id=863707

    I have modified your patch and incoporated it into 1.1.6,
    along with support for log file rotation, and some performance
    changes for large log files.

    Thanks for the excelent idea Hannes,

    David

     
  • David R Hinkle
    David R Hinkle
    2003-11-10

    • status: open --> closed