5.8.5

Table Of Contents
Table 44. Looping Function Formats (Continued)
Format Description
functN(res:met,n) Similar to funct(res:met), except that it checks down or up the number of levels
indicated by n instead of working on only the immediate children. This behavior is
inclusive.
For example, avgN(App1:CPUuse,3) averages the CPUuse metric for the children,
grandchildren, and great-grandchildren of the App1 resource. If n is negative, the
function checks the resource's parents instead of its children. If n is 1, this format is
the same as funct(res:met).
funct([val1,val2,val3...]) Array format of a looping function. It can include any number of of the following
values, separated by commas.
n
A resource:metric or resource kind:metric pair. The function takes the value of
the specified resource, not its children, unless you include a resource kind. If
you use a resource kind, you must specify a single metric for it, not a metric
kind. The function checks all resources of that type below the resource to which
it is assigned and acts on the value of the specified metric for those resources.
n
A constant.
n
A function or expression that returns a single value, such as
floor($This:AvgTransTime) or 100-(DBServer3:MemoryUsed).
For example, max([$This:CPUavg,Host3:CPUavg,VM:CPUavg]) finds the value of the CPUavg metric for the
resource to which the super metric is assigned, for the resource called Host3, and for all resources of type
VM that are below the resource to which the super metric is assigned in the resource tree.
Although this example uses the same metric in all three res:met pairs, you do not need to use the same
metric. For example, you can have one function take the average of the physical memory used for one
attribute, and the virtual memory used for a second attribute for one or more defined resources.
Single Functions
Single functions work on only a single value or a single pair of values.
Table 45. Single Functions
Function Format Description
abs abs(x) Absolute value of x. x can be any floating point number.
acos acos(x) Arccosine of x.
asin asin(x) Arcsine of x.
atan atan(x) Arctangent of x.
ceil ceil(x) The smallest integer that is greater than or equal to x.
cos cos(x) Cosine of x.
cosh cosh(x) Hyperbolic cosine of x.
exp exp(x) e raised to the power of x.
floor floor(x) The largest integer that is less than or equal to x.
log log(x) Natural logarithm (base x) of x.
log10 log10(x) Common logarithm (base 10) of x.
pow pow(x,y) Raises x to the y power.
rand rand(x:y) Generates a random number between x and y.
sin sin(x) Sine of x.
sinh sinh(x) Hyperbolic sine of x.
sqrt sqrt(x) Square root of x.
VMware vCenter Operations Manager Administration Guide
48 VMware, Inc.