Changeset 3413

Show
Ignore:
Timestamp:
03/12/10 23:19:43 (2 years ago)
Author:
steve.schnepp
Message:

- add "update_rate" to the accepted config keywords
- fixed the update_rate regex to accept bare numbers
- use DB_File that *always* comes with Perl core instead of GNU dbm

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/common/lib/Munin/Common/Config.pm

    r3404 r3413  
    3939        "unknown_limit", "num_unknowns", "dropdownlimit", 
    4040        "max_graph_jobs", "munin_cgi_graph_jobs", 
    41         "cgitmpdir", 
     41        "cgitmpdir", "update_rate", 
    4242        ); 
    4343 
  • trunk/master/lib/Munin/Master/UpdateWorker.pm

    r3404 r3413  
    202202 
    203203        use Fcntl;   # For O_RDWR, O_CREAT, etc. 
    204         use NDBM_File; 
    205         tie(%last_updated, 'NDBM_File', '/tmp/munin_plugins_last_updated', O_RDWR|O_CREAT, 0666) or ERROR "$!"; 
    206         DEBUG "last_updated{$key}: " . $last_updated{$key}; 
    207         my @last = split(/ /, $last_updated{$key}); 
     204        use DB_File; 
     205        tie(%last_updated, 'DB_File', '/tmp/munin_plugins_last_updated', O_RDWR|O_CREAT, 0666) or ERROR "$!"; 
     206        my $last_updated_key = $last_updated{$key} || ""; 
     207        DEBUG "last_updated{$key}: " . $last_updated_key; 
     208        my @last = split(/ /, $last_updated_key); 
    208209    
    209210        use Time::HiRes qw(gettimeofday tv_interval);    
     
    229230 
    230231        my ($is_update_aligned, $update_rate_in_sec); 
    231         if ($update_rate_config =~ m/(\d+[a-z]?) (aligned)?/) { 
     232        if ($update_rate_config =~ m/(\d+[a-z]?)( aligned)?/) { 
    232233                $update_rate_in_sec = to_sec($1); 
    233234                $is_update_aligned = $2;