Re: [AMaViS-user] Don't reset snmp.db at startup ?

This is a discussion on Re: [AMaViS-user] Don't reset snmp.db at startup ? within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Herold, > I was wondering why snmp.db is reset at startup... is there some real need > for that (...


Go Back   Usenet Forums > Anti-Spam and Anti-Virus Related Forums > Amavis User

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-10-2005
Mark Martinec
 
Posts: n/a
Default Re: [AMaViS-user] Don't reset snmp.db at startup ?

Herold,

> I was wondering why snmp.db is reset at startup... is there some real need
> for that (perhaps internal statistics, counters growing too much or
> something like that) ?


No real need to reset, one can keep these databases persistent.
The only reason for a reset was to make life easier in case of
database upgrades (db compatibility) and in cases of a database
corruption/recovery.

> I'm pulling some of that data straight out of the db with an simple
> evolution of amavisd-agent, and dump it into mrtg, and I'd like not having
> at least counters like InMsgs restarted at every configuration tweak
> (counters would still wrap at some time but I can live with that).
>
> I didn't find support for this and I'm not familiar with BerkelyDB... I
> suppose changes would have to been made either in child_init_hook() or
> directly in Amavis::DB::SNMP->new() ?
> Hmmm I see in that db is child process data, too, this means just keeping
> the old db instead of creating a new one could be harmfull, since at least
> that selected data should be initialized freshly every time ?


The key code is in:

package Amavis::DB;
....
# create new databases, then close them (called by the parent process)
# (called only if $db_home is nonempty)
sub init($) {
my($predelete) = @_; # delete existing db files first?


So changing Amavis::DB::init(1) into Amavis::DB::init(0)
in sub pre_loop_hook is supposed to work. I haven't tried it
recently, but earlier versions were happy one way or the other.

Mark


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/...fo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:38 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0