In Linux, you can clear the cache of the memory by using
sync; echo 3 > /proc/sys/vm/drop_caches
You can write shall script for the same..
Type crontab -e
Scroll to the bottom of the cron file using the arrows key and enter the following line:
0 * * * * /root/clearcache.sh
Create a file in '/root' called 'clearcache.sh' with the following content:
#!/bin/sh
sync; echo 3 > /proc/sys/vm/drop_caches
Once you have saved this file, the job is complete!
Every hour the cron job will run this command and clear any memory cache that has built up.
:)
No comments:
Post a Comment
Thank You for your Comments, We will read and response you soon...