From f3f486e126300ce47016018e688313fd88c20549 Mon Sep 17 00:00:00 2001 From: Benjamin Oechslein Date: Fri, 9 Jan 2015 21:57:15 +0100 Subject: [PATCH] Development changes: DBG output + don't fork away --- upsgraph.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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"); -- 2.39.2