NXSL:GetAvgDCIValue

From NetXMS Wiki
Revision as of 00:08, 6 June 2012 by Macro (talk | contribs) (Created page with "__NOTOC__ Get the average value of the DCI item for the given period. The item value must be of either integer or double type. == Syntax == GetAvgDCIValue(''node'',''dciitem...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Get the average value of the DCI item for the given period. The item value must be of either integer or double type.

Syntax

GetAvgDCIValue(node,dciitem,fromtime,totime);


Parameters

node Node object to calculate the average DCI value for.
dciitem DCI item id (integer).
fromtime Start of the peridod (timestamp).
totime End of the peridod (timestamp).

Return Value

Average value or null on failure.

Examples

sub main()
{
    value = GetAvgDCIValue(FindObject("MYWORKPC"), 18, 0, time()); // from the beginning till now
    trace(1, "Processor average load ". value . "%");
}