From: <buc...@us...> - 2011-01-22 21:24:52
|
Revision: 195 http://devmon.svn.sourceforge.net/devmon/?rev=195&view=rev Author: buchanmilne Date: 2011-01-22 21:24:45 +0000 (Sat, 22 Jan 2011) Log Message: ----------- Only respect ' x ' as multiplication, not 'x', otherwise oids with x in the name get mangled Modified Paths: -------------- trunk/docs/TEMPLATES trunk/modules/dm_tests.pm trunk/templates/netapp-misc/volume/transforms Modified: trunk/docs/TEMPLATES =================================================================== --- trunk/docs/TEMPLATES 2011-01-21 14:58:23 UTC (rev 194) +++ trunk/docs/TEMPLATES 2011-01-22 21:24:45 UTC (rev 195) @@ -440,12 +440,20 @@ ' . ' (string concatenation - note white space each side) '(' and ')' (Expression nesting) - This transform is not whitespace sensitive, so both: + This transform is not whitespace sensitive, except in the case of x, so both: {sysUpTime} / 100 and {sysUpTime}/100 ...would be accepted, and are functionally equivalent. + + However: + {ifInOps} x 8 + will work, while: + {ifInOps}x8 + will not. This is to avoid problems with oid names containing the character + 'x'. + The mathematical expressions you can perform can be quite complex, such as: ((({sysUpTime}/100) ^ 2 ) x 15) + 10 Modified: trunk/modules/dm_tests.pm =================================================================== --- trunk/modules/dm_tests.pm 2011-01-21 14:58:23 UTC (rev 194) +++ trunk/modules/dm_tests.pm 2011-01-22 21:24:45 UTC (rev 195) @@ -458,7 +458,7 @@ my $print_mask = '%.' . $precision . 'f'; # Convert our math symbols to their perl equivalents - $expr =~ s/x/\*/g; # Multiplication + $expr =~ s/ x / \* /g; # Multiplication $expr =~ s/\^/**/g; # Exponentiation # Extract all our our parent oids from the expression, first Modified: trunk/templates/netapp-misc/volume/transforms =================================================================== --- trunk/templates/netapp-misc/volume/transforms 2011-01-21 14:58:23 UTC (rev 194) +++ trunk/templates/netapp-misc/volume/transforms 2011-01-22 21:24:45 UTC (rev 195) @@ -1,3 +1,3 @@ -dfPercent : MATH : {dfKBytesUsed}/{dfKBytesTotal}x100 +dfPercent : MATH : {dfKBytesUsed}/{dfKBytesTotal} x 100 dfGBytesTotal : MATH : {dfKBytesTotal} / 1048576 dfGBytesUsed : MATH : {dfKBytesUsed} / 1048576 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |