Information

This site will undergo a brief period of maintenance on Friday, 18 December at 12:30 AM Central/12:00 PM IST. During a 30 minute window, site availability may be intermittent.

$scale (parse-spec, fmultiplier, foffset) function


This function scale the parsed value specified by the first argument by multiplying the value with the fmultiplier floating point number of the second argument and then adding the foffset floating point number of the third argument. All three arguments are required. The result is an integer number rounded down to the nearest integer value. 

Warning

Note

The arguments can be either integers or floating point numbers, and the fmultipler value can be used to divide the number. The parsed value must be numeric (either an integer or a floating point number) or no match occurs.

The following examples show target strings, parse expressions, and return values:

Target string

Parse expression

Return value

N1: 2000

$scale (n1: *, 0.5, 0)

1000

Explanation: The parsed value is multiplied by 0.5.

P1: 20KB


$scale (p1: *, 10, -50)

150

Explanation: The parse value (not including the KB units) is multiplied by 10 and then 50 is subtracted.

Q1: 24.999

 

$scale (Q1: *, 2, 0)

49

Explanation: The parse value is parsed as a floating point number, multiplied by two, then rounded down to the nearest integer

R1: Test

$scale (r1: *, 1, 0)

No match

Explanation: The parsed value is not an integer number.

Related topic

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Command Center for Security 6.2