mirror of https://github.com/mikaku/Monitorix.git
Add INHIBIT_LOCKING environment variable to disable rrd locking during the cgi call on a per call basis.
This commit is contained in:
parent
53569ee617
commit
5e7b84e620
|
@ -171,7 +171,7 @@ Default value: \fIy\fP
|
||||||
.P
|
.P
|
||||||
.BI enable_rrd_lock
|
.BI enable_rrd_lock
|
||||||
.RS
|
.RS
|
||||||
This option will synchronise the rrd file access by creating the file \fI/tmp/monitorix.lock\fP and use it via flock.
|
This option will synchronise the rrd file access by creating the file \fI/tmp/monitorix.lock\fP and use it via flock. The read lock during the cgi call can be disabled on a per call basis via setting the environment variable \fIINHIBIT_LOCKING\fP. This is useful for modules that call the cgi function internally.
|
||||||
.P
|
.P
|
||||||
Default value: \fIn\fP
|
Default value: \fIn\fP
|
||||||
.RE
|
.RE
|
||||||
|
|
|
@ -580,7 +580,7 @@ if($mode eq "localhost") {
|
||||||
my @writers; # array of file descriptors
|
my @writers; # array of file descriptors
|
||||||
my $children = 0;
|
my $children = 0;
|
||||||
|
|
||||||
my $lockfile_handler = lockfile_handler(\%config);
|
my $lockfile_handler = lockfile_handler(\%config) unless $ENV{INHIBIT_LOCKING};
|
||||||
global_flock($lockfile_handler, LOCK_SH);
|
global_flock($lockfile_handler, LOCK_SH);
|
||||||
foreach (split(',', $config{graph_name})) {
|
foreach (split(',', $config{graph_name})) {
|
||||||
my $gn = trim($_);
|
my $gn = trim($_);
|
||||||
|
|
Loading…
Reference in New Issue