Agent functions

Online 

Runs the command or script that you specify in the value of the StartProgram attribute. Runs the command with the specified parameters in the context of the specified user. 

To bring the resource online, the agent function performs the command: 

su - user - c command_to_online

Offline 

Runs the command or script that you specify in the value of the StopProgram attribute. Runs the command with the specified parameters in the context of the specified user. 

To take the resource offline, the agent function performs the command: 

su - user - c command_to_offline_resource

Monitor 

If you specify the MonitorProgram attribute, the agent executes the user-defined MonitorProgram in the user-specified context. If you specify the PidFiles attribute, the routine verifies that the process ID that is found in each listed file is running. If you specify the MonitorProcesses attribute, the routine verifies that each listed process is running in the context you specify. 

Use any combination among these attributes (MonitorProgram, PidFiles, or MonitorProcesses) to monitor the application. 

If any of the processes that are specified in either PidFiles or MonitorProcesses is determined not to be running, the monitor returns offline. If the process terminates ungracefully, the monitor returns offline and failover occurs. 

To monitor the resource, the agent function performs the command: 

su - user -c command_to_monitor_resource

Clean 

Terminates processes specified in PidFiles or MonitorProcesses. Ensures that only those processes (that are specified in the MonitorProcesses attribute) running with the user ID specified in the User attribute are killed. If the CleanProgram is defined, the agent executes the CleanProgram. 

To forcefully stop the resource, the agent function performs the command: 

su - command_to_offline_resource