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.
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 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 |
The PATROL discovery processes have the following design goals:
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 |
|
This automatic technique which requires no programming is not recommended for most application classes|
PSL Discovery |
|