[Orca-users] Winallator with Counter/Derived Plot Data Types
Joe Munson
Joe.Munson at swc.com
Mon Oct 1 07:07:11 PDT 2007
I'm trying to use perfmon counters that are counter or derived data types. They work fine until it comes across a line where perfmon inserts blank data (" "). The Winallator SourceFile.pm patch (orca/trunk/data_gatherers/winallator/SourceFile.pm-patch-with-r520.txt) converts " " to "0.00". This seems O.K. for gauge data types, but for counters, it translates to spikes of 30,000, and the graphs become unreadable. This cheap hack to the subroutine "load_new_data" fixes the graphs, but creates a new problem.
- if (defined $value) {
+ if (defined $value && not (($rrd_key =~ /_counter_/ || $rrd_key =~ /_derive_/) && $value eq "0.0")) {
+ if ($rrd_key =~ /_counter_/ || $rrd_key =~ /_derive_/) {
+ $value = int($value);
+ }
if ($self->[I_ALL_RRD_REF]{$rrd_key}->queue_data($time, $value)) {
if ($opt_verbose > 2 and !$add) {
print " Loaded '@line' at ", scalar localtime($time),
" ($time).\n";
}
$add = 1;
}
} else {
$close_once_done = 1;
warn "$0: internal error: expecting RRD name '$rrd_key' but no data ",
Now it skips lines that have both a value of "0.00" and are counter/derived types, but the next time orca looks for new data it tries to re-read that skipped data (maybe it isn't updating the state file?). If there are too many of the lines that were skipped, it kills the load on my server by constantly re-reading old data.
Does anyone have any suggestions?
More information about the Orca-users
mailing list