• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • How to clear cache in Linux

    Here I would like to share a script which you can use to clear your cache memory.

    IMPORTANT NOTICE:
    This is something one should not do as cache is used to speed up your work activity building a cache memory but still if you feel to clear your cache memory size then you can follow the following steps:

    Create a script





    # vi clearcache.sh
    #!/bin/bash
    sync; echo 3 > /proc/sys/vm/drop_caches

    save and exit
    # chmod +x clearcache.sh
    Sync should be run beacause this is a non destructive operation and dirty objects are not freeable. So we run sync in order to make sure all cached objects are freed.
    echo 1 is clearing only page cache
    echo 2 is to clear free dentries and inodes
    echo 3 is clearing page cache, dentries and inodes



    Follow the below link for more tutorials
    How to clear cache in Linux How to clear cache in Linux Reviewed by Deepak Prasad on Friday, August 17, 2012 Rating: 5

    No comments:

    Powered by Blogger.