summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c475dea)
raw | patch | inline | side by side (parent: c475dea)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 9 Nov 2010 16:16:05 +0000 (16:16 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 9 Nov 2010 16:16:05 +0000 (16:16 +0000) |
contrib/rrdjig/rrdjig.pl | patch | blob | history |
index 8e56660ce2d90481f59a9cf962f091101ea1b97f..8606e76841efce2698bf881ad1a5d3d8eb2d5780 100755 (executable)
--- a/contrib/rrdjig/rrdjig.pl
+++ b/contrib/rrdjig/rrdjig.pl
die "RRD Error: $err\n";
}
}
-sub rrd_warn_check(){
- my $err = RRDs::error();
- if ($err){
- warn "RRD Warning: $err\n";
- }
-}
# how should the data be fetched from the source
# to provide the best approximation of the original data
} else {
@max = @{$crow};
}
- print STDERR ($cf eq 'MIN' ? 'm' : 'M' ) ,$row,"\n" if $opt{verbose};
- push @up, $row;
+ if ($t > $min_time){
+ print STDERR ($cf eq 'MIN' ? 'm' : 'M' ) ,$row,"\n" if $opt{verbose};
+ push @up, $row;
+ }
$hide_cnt++;
for (my $i = 0; $i <@$crow; $i++){
if (defined $pending[$i]){
$hide_cnt = 0;
# show the result;
my $row = "$t:".join(':',map {defined $_ ? $_ : 'U'} @out);
- print STDERR " ",$row,"\n" if $opt{verbose};
- push @up, $row if $t > $min_time;
+ if ($t > $min_time){
+ print STDERR " ",$row,"\n" if $opt{verbose};
+ push @up, $row;
+ }
}
}
pop @up; # the last update is most likely one too many ...
if (@up == 0) {
warn "WARNING: src has no entries new enough to fill dst\n";
} else {
- print STDERR ".";
+ print "$min_time $up[0]\n";
RRDs::update($dst,
$opt{'dst-tmpl'} ? '--template='.$opt{'dst-tmpl'} : (),
@up);
- rrd_warn_check();
+ rrd_err_check();
}
}