Multi Threaded Service
The PerformanceGuard agent is implemented as a multithreaded Windows service. It hosts a number of threads, and each thread performs a share of the tasks of the agent.
The agent keeps track of the threads by running a check of all its threads on a regular basis. The period of the checks is twice the length of the PerformanceGuard delivery interval (or twice the report interval, if that’s longer).
The agent service will automatically restart if it detects threads that are out of control for two consecutive checks. A thread is considered to be out of control if it hasn’t registered itself with the agent’s checking mechanism for 60 seconds.
The same check also restarts the agent service in these situations:
- The thread that controls the report intervals has stopped.
- The thread that connects to the PerformanceGuard frontend server has stopped.
- The agent uses more than 60 MB of private memory.
Before the agent restarts itself, it tries to send its reports to the server. The agent logs the restart in its error log with severity Blocking, and it stores the reason in the RestartReason registry value. See Agent Error Logging.
You can view the status of agent’s threads in the agent’s status report. See Status Report.