From: Benjamin Oechslein Date: Fri, 9 Jan 2015 20:57:15 +0000 (+0100) Subject: Development changes: DBG output + don't fork away X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/upsgraph/commitdiff_plain/f3f486e126300ce47016018e688313fd88c20549 Development changes: DBG output + don't fork away --- diff --git a/upsgraph.pl b/upsgraph.pl index 4f66090..3f17d38 100755 --- a/upsgraph.pl +++ b/upsgraph.pl @@ -35,7 +35,7 @@ my $hosts = $UPSGRAPH::hosts; sub rrd_update(@) { my @args = @_; - + print "Updating: ". Dumper(\@_); if ($use_rrds == 1) { RRDs::update(@args); $rrd_result = RRDs::error; @@ -47,7 +47,7 @@ sub rrd_update(@) { sub rrd_graph(@) { my @args = @_; my @rrd_out = (); - + print "Graphing: " . Dumper(\@_); if ($use_rrds == 1) { @rrd_out = RRDs::graph(@args); $rrd_result = RRDs::error; @@ -93,6 +93,7 @@ sub rrdcreate(@) { RRDs::create(@cmd); if (RRDs::error) { print "Error while creating: " . RRDs::error . "\n"; + print Dumper(\@cmd); exit 1; } } @@ -415,11 +416,11 @@ foreach my $host (@$hosts) { } } -my $child = fork(); - -die "fork failed!" if (!defined($child)); - -exit 0 if ($child != 0); +#my $child = fork(); +# +#die "fork failed!" if (!defined($child)); +# +#exit 0 if ($child != 0); while(1) { open(HTML, ">${outdir}/index.html.new");