Use the Memory Allocation Agent

The Memory Allocation agent monitors memory failures on your Packeteer unit. The standard alert is a red indicator on the info tab (PacketWise) or configuration tab (PolicyCenter). In addition, you can have an email, SNMP trap, or syslog message sent when the system load is high (such as 95%); this method requires that you create an action file — a text file of PacketWise commands. The action file can include any CLI command that can run without additional user input. See Action File Overviews for more information.

In order to use this feature, adaptive response must be enabled and you must create an agent based on the Memory Allocation template.

Create a Memory Allocation Agent

To create a Memory Allocation agent:

  1. On the setup tab, click the Adaptive Response Settings link.

  2. Click add. The Add Agent Entry window will open.

  3. In the create a new agent from this agent template drop-down list, choose Memory Allocation.

  4. Enter a unique identifying name for the new agent in the Name field.

  5. If desired, change the evaluation interval, in minutes (how often the agent should measure its target).

  6. Click OK and Edit Parms. This will open the Edit Agent Entry window where you can define the parameter values for your new agent.

  7. If desired, modify the threshold values:

    RedThreshold — The value at which the status of the agent turns red, and a red action file is triggered, if present. For instance, if the RedThreshold is set to 2, the agent's status will change to red when there are more than 2 memory failures in the interval.

    GreenThreshold — The value at which the status of the agent turns green, and a green action file is triggered, if present. For instance, if the GreenThreshold is set to 0, the agent's status will be green when the unit doesn't have any memory allocation problems in the interval.

  8. Click OK to save your changes.

Check the Agent Status

Note: Before you can check the status of the Memory Allocation agent, you will need to wait until the first evaluation interval has passed (60 minutes, by default).

To check the status of the Memory Allocation agent:

  1. Click the info tab. The PacketShaper’s info tab shows an icon for each agent category, and a colored status indicator for each. The Memory Allocation agent is in the Unit Health category.

  2. To see the status of the Memory Allocation agent, hover your mouse over the Unit Health colored status indicator, as shown below.



  3. In the pop-up window, locate the Memory Allocation agent. The value (0 in the figure above) indicates the number of memory failures in the interval.

    What color is its status indicator?

    Green — During the last evaluation interval, the Packeteer unit did not have any memory allocation errors.
    Yellow — During the last evaluation interval, the unit had at least one memory failure. (Yellow is the range between the red and green thresholdsy
    Red — During the last evaluation interval, the Packeteer unit experienced several memory failures (more than the defined red threshold). If the status indicator is red, you should look at the incident report for details.

    If the agent has ever changed status (from green/yellow to red or from red/yellow to green, a report icon with a link to a detailed incident report will be available for that agent.

  4. If there is a report for the Memory Allocation agent, click the report icon.

Create an Action File

If you would like to be notified by email when the PacketShaper is experiencing memory failures above the red threshold, you can create a command file that contains a single line: the send email command. By designating this command file as the red action file, an email will be sent when the red threshold is crossed.

Note: In order to send email notification, you must configure an SMTP server in PacketWise.

To create an action file:

1. If the info tab is currently displayed, click the Settings link; otherwise, go to the setup tab and click the Adaptive Response Settings link.

2. Click the edit button next to the Memory Allocation agent.

3. Click the browse files button. The File Browser window opens and shows the contents of the 9.258/agent/cmd directory (where action files need to be stored).

4. Click the new cmd file button. A command file window opens.

5. In the File Name field, enter a unique name for your action file up to eight characters long, including 0-9, a-z, A-Z, -,_. Spaces are not allowed. The file will automatically be assigned the extension .cmd. Example: red-mem

6. In the Contents area, enter the following commands:

#Title: red action file for Memory Allocation agent
send email <address> "<subject>" ["<body>"]


where <address> is the email address of the recipient. For example:

send email raltman@test.com "Memory Allocation" "The PacketShaper is currently experiencing problems with memory allocation. Go to the info tab to view the incident report for the Memory Allocation agent."

Note: If you want to send an email notification to more than one recipient, repeat the send email command for each email address.

Alternatively, you can include the variables for the agent name ($agentname) and the number of memory failures ($scorevalue) in the <subject> or <body>, as the following example shows:

send email raltman@test.com "$agentname agent" "The PacketShaper recently had $scorevalue memory failures. Go to the info tab to view the incident report for the $agentname agent."

When the message is sent, the body of the email message would look something like this:

The PacketShaper recently had 3 memory failures. Go to the info tab to view the incident report for the Memory Allocation agent.

7. Click save.

8. Enter the name of your action file in the Red Action File field (for example, red-mem.cmd).

9. Click OK.

After the next evaluation interval, an email will be sent if and when the agent's red threshold is crossed. If you like, you can create a green action file to notify you when the Memory Allocation agent returns to a green status.


PacketGuide™ for PacketWise® 8.1