Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configure Limits on Executed Event Policies and Memory Allocation for Scripts

On Junos devices, you can configure the maximum number of event policies that can run concurrently on the system and the maximum amount of memory allocated for the data segment for scripts of a given type. This example configures a limit on the number of event polices that the device can execute concurrently and also configures maximum memory limits for executed commit, event, op, and SNMP scripts.

Requirements

A device running Junos OS Release 12.3 or later.

Overview

This example configures the device to limit the number of event policies that can run simultaneously to a maximum of 12 policies. Additionally, the example configures each script type with a maximum amount of memory that the system can allocate to the data segment portion of a script of that type. The device is configured to allocate 192 MB for each executed commit script and event script and 100 MB for each executed op and SNMP script.

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them in a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level:

Procedure

Step-by-Step Procedure

  1. Configure the maximum number of event policies that can execute concurrently.

  2. Configure the maximum memory allocated for the data segment for each executed commit script.

  3. Configure the maximum memory allocated for the data segment for each executed op script.

  4. Configure the maximum memory allocated for the data segment for each executed SNMP script.

  5. Configure the maximum memory allocated for the data segment for each executed event script.

  6. Commit the configuration.

Results

Verification

Confirm that the configuration is working properly.

Verifying the Limit on Concurrently Executing Event Policies

Purpose

If the system is running the maximum number of event policies, the system ignores any triggered event policy until such time that another policy finishes. The system logs the EVENTD_POLICY_LIMIT_EXCEEDED messsage for any triggered event policies that were not executed. By default, system log messages are recorded in the messages log file.

Action

Review the configured log file to verify whether any policies were barred from execution, because the maximum limit was reached. You can narrow the output to include only the relevant error messages by appending | match EVENTD_POLICY_LIMIT_EXCEEDED.