Start a conversation

Automating Cache Clearing on Exinda Appliances

Overview

When experiencing high RAM usage on an Exinda appliance, it may be necessary to clear the cache to improve performance. Directly executing Linux commands to clear the cache is not recommended due to potential system instability. Instead, setting up a cron job to automate cache clearing using a script in the restricted shell is advised. This article provides the steps to create and schedule such a job.

Information

To set up a cron job for cache clearing on your Exinda appliance, follow these steps:

  1. Access the Restricted Shell:
    • Enter the restricted CLI by typing en_shell.
  2. Create a Shell Script:
    • Navigate to the bin directory: cd /bin/.
    • Create a new shell script file: touch clearcache.sh.
    • Open the file in the vi editor: vi clearcache.sh.
    • Press I to enter edit mode and add the following line:
    • #!/bin/bash
      echo "echo 3 > /proc/sys/vm/drop_caches"
    • Press Esc to exit edit mode and type :wq! to save and quit.
  3. Set Execute Permissions:
    • Make the script executable: chmod 755 clearcache.sh.
  4. Create a Cron Job:
    • Navigate to the home directory: cd ~.
    • Create a cron job file: touch clearcache.cron.
    • Open the file in the vi editor: vi clearcache.cron.
    • Press I to enter edit mode and add the following line to schedule the script to run daily at 2 AM:
    • 0 2 * * * /path/to/clearcache.sh
    • Press Esc to exit edit mode and type :wq! to save and quit.
  5. Add the Cron Job:
    • Return to shell mode: en_shell.
    • Add the cron job: crontab -u admin ~/clearcache.cron.
  6. Verify the Cron Job:
    • Check if the cron job was added successfully: crontab -l.

Ensure you have a backup of your Exinda configuration before proceeding. A restricted shell license is required to access the restricted shell and create this job. Proceed with caution as changes in the restricted shell are not supported.

Frequently Asked Questions

What is the purpose of setting up a cron job for cache clearing?
Setting up a cron job automates the process of clearing the cache, which can help manage high RAM usage and improve the performance of your Exinda appliance.
Can I execute the cache clearing command directly on the Exinda appliance?
Directly executing the command sync; echo 3 > /proc/sys/vm/drop_caches is not recommended as it may lead to system instability. It is safer to automate the process using a cron job.
What should I do before setting up the cron job?
Ensure you have a current backup of your Exinda configuration and obtain a restricted shell license if needed. Be aware of the potential impact on your monitoring data.
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments