This function calculates availability as a percentage using sysUptime and the poll duration, granting a grace period.
Syntax
This function has the following format:
Object availabilityWithSysUptime (Long sysUpTime, Long duration)
Parameters
The time (in centiseconds) since the network management portion of the system was last reinitialized.
The poll duration time in seconds. Use the global variable _rspDuration. See the Advanced example for more information.
Return Values
Returns the availability as a percentage (0–100), or returns "null" when invalid data is passed.
Examples
The following expression produces the following result for a sysUpTime of 30000 and a poll duration of 300:
Expression:
availabilityWithSysUptime (sysUpTime, duration)
Result:
100
The same expression produces the following result for a sysUpTime of 6000 and a poll duration of 300:
Result:
20
The same expression produces the following result for a sysUpTime of 30005 and a poll duration of 300:
Result:
100
Advanced Example
The following expression is taken from “System Statistics” Vendor Certification:
Availability=availabilityWithSysUptime(sysUpTime,_rspDuration)
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|