Projet

Général

Profil

Révision a2b3e009

IDa2b3e009afc271c7f774bd280182abd3f6a7194f
Parent b6f9a54a
Enfant e6ece317

Ajouté par Luc Didry il y a plus de 13 ans

Bugfix : force lockfile removal if the cache is really too old

Voir les différences:

plugins/disk/du-2
159 159
} ## cache_is_too_old
160 160

  
161 161
sub du_not_running {
162
	return 0 if (-e $LOCKFILE);
163
	return 1;
162
    if (-e $LOCKFILE) {
163
        my ($time) = `cat $TIMEFILE`;
164
        chomp $time;
165
        if ( (time - $time) > ($ENV{interval}*60*60) ) {
166
            # The cache is really old (60xinterval) => Maybe the lockfile wasn't properly deleted.
167
            # Let's delete it.
168
            system("rm $LOCKFILE;");
169
            return 1;
170
        } else {
171
	        return 0;
172
        }
173
    } else {
174
        return 1;
175
    }
164 176
}
165 177

  
166 178
sub munin_exit_done {

Formats disponibles : Unified diff