Difference between revisions of "NXSL:GetMinDCIValue"

From NetXMS Wiki
Jump to navigation Jump to search
(Undo revision 1163 by 178.236.195.24 (talk))
Line 1: Line 1:
__NOTOC__
__NOTOC__
Get the sum value of the DCI for the given period. The DCI value must be of numeric type.
Get the minimum value of the DCI for the given period. The DCI value must be of numeric type.


'''Since:''' 1.2.7
'''Since:''' 1.2.1


== Syntax ==
== Syntax ==


GetSumDCIValue(''node'', ''dciId'', ''from'', ''to'');
GetMinDCIValue(''node'', ''dciId'', ''from'', ''to'');




Line 13: Line 13:
:{|
:{|
|-
|-
| ''node'' || [[NXSL:Node|Node]] object to calculate the sum DCI value for.
| ''node'' || [[NXSL:Node|Node]] object to calculate the mininum DCI value for.
|-
|-
| ''dciId'' || DCI item id (integer).
| ''dciId'' || DCI item id (integer).
Line 31: Line 31:
sub main()
sub main()
{
{
     value = GetSumDCIValue(FindObject("MYWORKPC"), 18, 0, time()); // from the beginning till now
     value = GetMinDCIValue(FindObject("MYWORKPC"), 18, 0, time()); // from the beginning till now
     trace(1, "Processor sum load ". value . "%");
     trace(1, "Processor minimum load ". value . "%");
}
}
</syntaxhighlight>
</syntaxhighlight>

Revision as of 11:43, 25 April 2014

Get the minimum value of the DCI for the given period. The DCI value must be of numeric type.

Since: 1.2.1

Syntax

GetMinDCIValue(node, dciId, from, to);


Parameters

node Node object to calculate the mininum DCI value for.
dciId DCI item id (integer).
from Start of the peridod (as UNIX timestamp).
to End of the peridod (as UNIX timestamp).

Return Value

Minimum value or null on failure.

Examples

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