PATROL Agent mode of operation
The PATROL Agent monitors applications by running various jobs on a periodic basis. Following are the jobs included:
- Running various parameters scripts
- Refreshing process cache
- Performing application discovery
The agent has two internal run queues which process all jobs: Main and PSL. If a job is running, it cannot be in a queue.
Main run queue
The main run queue manages all jobs. When it is time for a job to be scheduled for execution, the agent uses an algorithm to calculate its time of execution and places it in the queue. The algorithm takes into consideration the run time of other jobs and various agent scheduling variables. At execution time, the agent does one of the following tasks:
- Spawns a child process to execute as a separate OS process, if it is an operating system command
- Places the job in the PSL run queue, if it is a PSL command
PSL run queue
The PSL run queue manages all PSL commands. It runs the commands in the agent's process space. The PSL run queue works by alternating between commands in a round-robin fashion. During each processing segment, the agent performs as many PSL instructions as it can, up to 50, within the allotted time period.
Recurring or periodic jobs
Once a periodic job terminates, the agent reschedules the job and places it back in the main run queue.
PATROL Agent job scheduling is inexact. The agent schedules jobs to run as close as possible to their "ideal" execution time without overburdening the system with PATROL activity.
In determining how often a job runs, you need to figure out how long you can wait to gather statistics. The longer PATROL monitoring activities can be postponed, the less the impact on the system.