#!/usr/local/bin/php -q 75) { $rotate_reason .= "$cachedir/swap.state file is taking up more than 75% of disk space. "; } if ($diskusedpct > 90) { $rotate_reason .= "$cachedir filesystem is $diskusedpct pct full. "; } if ($swapstate_size > 1024*1024*1024) { $rotate_reason .= "$cachedir/swap.state is larger than 1GB. "; } if ($argv[1] == "clean") { $rotate_reason .= "Clear cache forced by running swapstate_check.php manually with {$argv[1]} argument. "; } if (($swapstate_pct > 75) || (($diskusedpct > 90) && ($swapstate_size > 1024*1024*1024)) || $argv[1] == "clean") { squid_dash_z('clean'); log_error(gettext(sprintf("[squid] $rotate_reason Removing and rotating. File was %d bytes, %d%% of total disk space.", $swapstate_size, $swapstate_pct))); } } ?>