Révision a2b3e009
Bugfix : force lockfile removal if the cache is really too old
| 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