Server Memory cache buffers reset

0
(0)

Linux admin does not know this, according to a conscience uptime almost all memory is used up for cache and buffers of the server, actually it is not necessary to intervene in the memory management of the system, but the system is scarce in memory, this can be prevent with a simple script.

free_mem

After login as root and open the script in editor:

$ vi /usr/sbin/clearcache.sh

Now make the script executable.

and run as crontask at 5, 1 3 and 9 p.m.

Use free -m to observe free memory before and after the reset, the task is also logged under /var/log/clearcache.log and can be output to stdout with “tail /var/log/clearcache.log”.

clear cache
clear cache

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

Your email address will not be published. Required fields are marked *