Dampen Script Execution
The Junos software automation feature enables you to create commit, op, event, and SNMP scripts to automate Junos devices. These scripts can be CPU-intensive, potentially impacting other critical software processes such as the routing protocol process (rpd). You can configure the device to dampen or slow down the execution of SLAX and XSLT commit, op, and event scripts. Although the scripts are processed more slowly, enabling script dampening helps to ensure that the other critical software processes can function normally.
Script dampening is only supported for SLAX and XSLT scripts. Junos devices do not support script dampening for Python automation scripts.
The script dampening feature does not work for certain CPU-intensive remote procedure calls (RPCs), including the following:
Executing the following RPC might cause the software process to consume numerous CPU cycles. This cannot be avoided as it is outside the control of the cscript process and up to the software process to optimize.
var $cmd = <command> "show snmp mib walk .1"; var $out = jcs:invoke($cmd);
The cscript process might consume numerous CPU cycles for this particular RPC, as this involves parsing of the XML configuration returned by the management process (mgd). This cannot be avoided since a single line in the script triggers the processing.
var $config = jcs:invoke("get-configuration");
To enable script dampening: