Hi dear,
i want to create a script that will automatically detect my /var size of linux partition in redhat and then it should automatically stop service and should remove all the files in squid cache. i don't know how to check that partition is filled or not??? can any one help me
Scenarion of Script
1>Check that /var is fill or not??
2> if (yes)
{Remove squid cache files}
3>else
{should check again}
Regards.
Muhammad Asif
I would run a cron job that checks for the size free and if its too small runs another job that stops needed services, clears the caches, and then restarts the services. I would include (from personal experience here) samba in that shutdown script as well, since I have had it bork out due to lack of free space once, and I thought my computer fried due to the sluggishness even after freeing the space. What was needed was a stop a wait and then a restart (took a 5 min pause to ensure that it did indeed speed my machine up).Originally Posted by asi.linux
Bookmarks