Example, Context, Usage – Brocade Virtual ADX OpenScript API Guide (Supporting ADX v03.1.00) User Manual
Page 104: Input parameters, Return values

92
Brocade Virtual ADX OpenScript API Guide
53-1003243-01
Methods
7
Example
OS_SLB::is_server_up("server-name"=>$name, "server-id"=>$id,
"port"=>$port)
Returns “1” if the server specified by $name, $port or $id is up.
Context
This function can be called from any event.
Usage
Can be used to check the server health status from the script.
Input Parameters
The following table contains the input values.
NOTE
The three options only work in fixed combinations.
$id can not be combined with other parameters.
$port must be used along with $rsname. Also, for it to return the correct value, the real server port
must be binded under the virtual service port.
Return Values
The following table contains the return values.
TABLE 111
Input Values
Name
Type
Description
$name
string
The server name.
$port
integer
The server port number.
$id
integer
The server ID.
TABLE 112
Return Values
Name
Type
Description
integer
The API returns 1 when the real
server status is up, the given
real server port status is up, or
the given real server port ID is
up. Otherwise, the API returns 0.
use OS_SLB;
use OS_HTTP_REQUEST;
sub HTTP_REQUEST{
my @servers = OS_SLB::servers($id);
}