Important This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent for BMC Helix Operations Management 24.2.

in_transition()


Wait for a PSL object to change state.

Syntax

in_transition(object,timeout)

Parameter

Parameter

Definition

object

name of the object that is being checked for transition between states

timeout

time in seconds that is allowed for the transition between states

Description

When first called, the in_transition() function sets a timer equal to timeout seconds on application instance object. While the timer is running, subsequent in_transition() function calls return FALSE. 

After the timer has expired, calls to the in_transition() function continue to return FALSE until the next full discovery cycle, at which time the in_transition() function will return TRUE and reset the timer. The timer is also reset by calls to the PSL change_state() function. (For more information, see change_state().) 

The in_transition() function sets the errno variable when there is a problem finding the instance specified by the objectparameter. The in_transition() function sets the errno variable under the following conditions:

errno Value

Description

12

E_PSL_CREATE_EMPTY 
object = ""

13

E_PSL_CREATE_EMPTY_SYMBOL_TABLE 
application specified by object is an application but it does not have a symbol table

14

E_PSL_CREATE_INTERNAL_FAILURE 
undetermined internal error

15

E_PSL_CREATE_INACTIVE_APPLICATION 
application specified by object refers to an inactive application

17

E_PSL_CREATE_UNKNOWN_APPLICATION 
application specified by object is not an application

 

If an error occurs while looking up the instance the in_transition() function returns the NULL string ("").

Example

The following example uses the in_transition() function to set a 3-minute timer against the ORACLE database instance dev, and when the timer expires, the in_transition() function waits for the next full discovery cycle and changes the state of dev to ALARM:

# Some database processes APPEAR to be down.
# Wait to make sure that the database is not
# in the middle of a startup or shutdown.
if (!in_transition ("/ORACLE/dev", 180))
{
change_state("/ORACLE/dev",ALARM,"Database has crashed.");
}

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*