Monitoring the CPU Usage of Scripts
To prevent CPU overload due to scripts execution, it is possible to monitor the CPU resources consumed by scripts and set limits on their permitted CPU usage.
- In System Browser, select Management View.
- Select Project > Management System> Servers > Main Server > Scripting.
- In the Operation tab, set the property Stop Scripts On CPU Overload to
True
.
- (Optional) Modify the default CPU overload settings:
- Maximum CPU Overload (maximum percentage of CPU resources that scripts are allowed to use; default is 80%; if set to 0, CPU monitoring is disabled.)
- Maximum CPU Overload Time (maximum interval of time allowed for the CPU overload; default is 15 minutes; if set to 0, CPU monitoring is disabled.)
- CPU monitoring is enabled. The property Current CPU Usage shows the actual percentage of CPU resources consumed by the scripts in execution.
CPU overload
When the specified CPU overload % is exceeded for the specified duration, any script in execution will be ended with Last Execution Status = Stopped due to CPU overload
.
CPU monitoring is disabled, and the value of Current CPU Usage is reset to 0:
- If the property Stop Scripts on CPU Overload is set back to False
.
- If the value of Maximum CPU Overload or Maximum CPU Overload Time is set to 0.