Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
monitors:diskstat.pl [2019/02/12 18:46] – [Installation] wnelis | monitors:diskstat.pl [2019/02/16 17:53] (current) – [diskstat.pl] wnelis | ||
---|---|---|---|
Line 177: | Line 177: | ||
# This script does not have any memory by design. It only reports the values | # This script does not have any memory by design. It only reports the values | ||
# found in / | # found in / | ||
- | # more appropiate | + | # more appropriate |
# previous pass is of interest. These differences are computed by RRD, prior to | # previous pass is of interest. These differences are computed by RRD, prior to | ||
# saving the values. | # saving the values. | ||
Line 206: | Line 206: | ||
my $InpFil= '/ | my $InpFil= '/ | ||
# | # | ||
- | # Define the name of each dataset and the unit conversion factor. As most of the | + | # Define the name of each data-set, |
- | # datasets are defined to be of type DERIVED, the value passed to RRD must be an | + | # Note that RRD requires that the values |
- | # integer number. Thus the times expressed in [ms] are *not* converted to [s]. | + | # however floating point numbers are used, the RRD type must be set to |
+ | # ' | ||
# | # | ||
my @DS= ( # Define parameters of the datasets | my @DS= ( # Define parameters of the datasets | ||
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
- | [ ' | + | [ ' |
) ; | ) ; | ||
Line 282: | Line 283: | ||
# | # | ||
# Function BuildRrdData reports the values in Devmon format to Xymon, causing | # Function BuildRrdData reports the values in Devmon format to Xymon, causing | ||
- | # Xymon to write the values to an RRD. The names of the mountpoints | + | # Xymon to write the values to an RRD. The names of the mount-points |
# to match the Xymon conventions. | # to match the Xymon conventions. | ||
# | # | ||
Line 312: | Line 313: | ||
} else { | } else { | ||
$Val= $Val * $DS[$i][1] ; # Unit conversion | $Val= $Val * $DS[$i][1] ; # Unit conversion | ||
- | $Result.= sprintf( " | + | if ( $DS[$i][2] eq ' |
+ | $Result.= sprintf( " | ||
+ | } else { | ||
+ | | ||
+ | } # of else | ||
} # of else | } # of else | ||
} # of for | } # of for |