Page tree

Application discovery is the PATROL procedure that detects if and how many occurrences of a system resource--such as a filesystem, printer, disk, or software application--exist on a machine.
Using the application class discovery procedure, the PATROL Agent finds all occurrences of an application class currently running on a monitored machine and represents the resources visually with distinctive icons indicating the operating status of the resource.

How does PATROL find applications

PATROL discovery can search a variety of system resources to detect if an instance of an application class exists. It can look for files, processes, shared memory segments, the state of communication links, or whatever may be appropriate. One of the most common means of detecting active application instances is searching for their processes. 

The PATROL Agent keeps a snapshot of the system's process table in a cache that it periodically updates--the internal process cache table. To minimize system overhead, the PATROL Agent searches this internal process cache table rather than accessing the system process list directly every time process information is required. 

The PATROL Agent updates this cache using a periodic internal process--the process cache refresh--which forks off a platform-dependent system query to obtain the list of the active process IDs. The PATROL Agent manipulates the process query output and stores it in its internal process cache table. The actual process cache query issued can be controlled by various PATROL options. 

The PATROL Agent stores the process IDs of all the discovered application instances and through a related cycle--the application check cycle--verifies whether these processes are still running. 

As the following figure shows, the internal process cache refresh process is a cyclic PATROL Agent process that runs every 300 seconds by default. This value can be changed by setting the PATROL Agent internal configuration variable, /AgentSetup/AgentTuning/getProcsCycle. 

The application check cycle is a discovery cycle--with a frequency of 40 seconds by default--in which the PATROL Agent executes discovery to detect any new application instances and verify that all earlier detected application instances still exist. 

The process cache refresh cycle affects whether an application check cycle is a full discovery or a partial discovery cycle. A full discovery cycle is the first discovery cycle for a given application class after the PATROL Agent's internal process cache is refreshed--that is--the first time a given application class' discovery process executes after the Agent's internal process cache data is updated. The PSL full_discovery() function returns a "true" Boolean value if called in the first discovery process execution after a process cache refresh. 

A partial discovery cycle is a discovery cycle for a given application class in which the PATROL Agent's internal process cache data has not been updated with data from the system process list since the application class' discovery process last executed. 

To check if the current application is in a full discovery cycle, use the PSL Boolean function, full_discovery(), in the PSL discovery script. 

 PATROL Agent process cache refresh cycle 

Scheduling the discovery cycles

Scheduling of the discovery cycles--the application check and the process cache refresh cycles--are controlled by two PATROL Agent built-in variables as shown in the following table. 

Customizing discovery cycles

Discovery cycle

Default value

How to customize

Application check cycle rate

40 seconds

Configurable for an application class through the Application dialog box Custom Discovery Cycle option or by setting the PATROL Agent namespace variable /AgentSetup/AgentTuning/appCheckCycle

Process cache refresh cycle rate

300 seconds

Configurable by setting the PATROL Agent namespace variable /AgentSetup/AgentTuning/getProcsCycle

Discovery design goals

The PATROL discovery processes have the following design goals:

  • Ensure that a monitored application class is only instantiated on systems on which it actually resides.
  • Automate the process of discovering instances of the application class to the fullest extent possible.
  • Discover a monitored application instance and set its state without dependencies on manual setup operations, such as requiring the user to input an application user name and password.

Choosing a discovery method for a PATROL KM

Use the following table to determine the most appropriate application discovery method to use for a specific application class.

Comparing discovery methods

Use

For task

Simple Discovery

  • Detect an application class instance and its state by only checking for the presence of one or more files and/or one or more processes.

This automatic technique which requires no programming is not recommended for most application classes|

PSL Discovery

  • Check whether the proper environment exists for application discovery to proceed.
  • Set application instance states based on more specific criteria than simple discovery.
  • Define PATROL Agent namespace variables for each monitored application instance.
  • Set up validation and error recovery procedures for the discovery process.
  • Set application instance states explicitly using conditional logic.
  • No labels