Agent functions

Online

To start the Apache HTTP server, the agent:

  • Executes the httpdDir/httpd program with the appropriate arguments if the httpdDir program specifies the full path of the directory in which the httpd binary file is located.

  • Alternatively, if the httpdDir attribute specifies the full path of the Apache HTTP server binary file, the binary file is executed with appropriate arguments.

When you specify a file with the EnvFile attribute, the file is sourced before the agent executes the Apache HTTP server commands.

Offline

To stop the Apache HTTP server, the agent:

  • Executes the httpdDir/httpd program with the appropriate arguments, if httpdDir specifies the full path of the directory in which the httpd binary file is located.

  • Alternatively, if the httpdDir attribute is used to specify the full path of the Apache HTTP server binary, the binary file is executed with appropriate arguments.

  • Sends a TERM signal to the HTTP Server parent process (Apache).

When you specify a file with the EnvFile attribute, the file is sourced before the agent executes the Apache HTTP server commands.

Monitor

Monitors the state of the Apache server. First it checks for the processes, next it can perform an optional state check.

Clean

Removes the Apache HTTP server system resources that might remain after a server fault or after an unsuccessful attempt to online or offline. These resources include the parent httpd daemon and its child daemons.

Action

checkconffile.vfd

Checks for the existence of the Apache configuration file and the existence of the directory that contains the httpd binary that is used during start up.

For a local installation, if the config file or HttpdDir is not found, make sure that it exists on the failover node.

imf_init

Initializes the agent to interface with the AMF kernel driver. This function runs when the agent starts.

imf_getnotification

Gets notification about resource state changes during the online operation. This function runs after the agent initializes with the AMF kernel driver. The agent continuously waits for notification and takes action on the resource upon notification.

imf_register

Registers the resource entities for online monitoring with the AMF kernel driver. The Apache agent reports the resource as online when the parent Apache HTTP server process and at least one child HTTP server process is running. The Process ID of the parent Apache HTTP server process and one child process found on the system is registered with AMF.

For example, the function registers the PID of the process that requires online monitoring. This function runs for each resource after the resource goes into steady online state.