getStatusResp()
Description:
Get the status of this server instance as a numeric value.
Returns:
A numeric value indicating the status:
0: There are no problems with this server instance.
1: There is an ‘informational’ status available, but the server instance is functional.
2: There is a problem with this server instance.
Example:
// If there is a problem with this server instance, print the status (accessible
using ‘lastrun’ command).
$sp = srvpool::getByName(“sp00”);
$si = si::getByName($sp, "sv00");
if ($si->getStatusResp() == 2) {
echo $si->getStatusDescription();
}
getCurrentWeight()
Description:
Get the dynamic weight of this server instance as a numeric value.
Returns:
A numeric value indicating the weight.
Example:
// Print the current weight (accessible using ‘lastrun’ command).
$sp = srvpool::getByName(“sp00”);
$si = si::getByName($sp, "sv00");
if ($si->getStatusResp() == 2) {
echo $si->getCurrentWeight();
}
stats(string statName)
Description:
Get the value of the statistic named
‘statName’
. The available statistics are the same as those displayed in
the CLI when using the srvpool <name> si <name> stats command.
Returns:
On success, the last-measured value of this statistic. On failure, an exception describing what went wrong:
invalid statistic name or no statistic specified.
Example
:
$sp = srvpool::getByName(“sp00”);
$si = si::getByName($sp, "sv00");
if ($si->stats(“TOTALPRCSD”) > 100) {
echo “Processed more than 100 requests through sv00”;
}
Copyright © 2014 Coyote Point Systems, A Subsidiary of Fortinet, Inc.
All Rights Reserved.
693
Equalizer Administration Guide
Summary of Contents for Equalizer GX Series
Page 18: ......
Page 32: ...Overview 32 Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc ...
Page 42: ......
Page 52: ......
Page 64: ......
Page 72: ......
Page 76: ......
Page 228: ......
Page 238: ......
Page 476: ......
Page 492: ......
Page 530: ......
Page 614: ......
Page 626: ......
Page 638: ......
Page 678: ......
Page 732: ...Using SNMP Traps 732 Copyright 2014 Coyote Point Systems A Subsidiary of Fortinet Inc ...
Page 754: ......
Page 790: ......
Page 804: ......
Page 842: ......
Page 866: ......