[Reproduced from: http://hi.baidu.com/yerkle/blog/item/26c3eb177186720bc93d6d9b.html]
Squid suddenly stopped today. The service squid start command is used to display OK. netstat-an | grep TCP command is used to find that no corresponding port is monitored. PS-x |
Grep squid cannot find the process.
View/var/log/squid. out and find the following error.
Squid: Error: cocould not send signal 0
Process 3275: (3) No such process
Squid: Error: cocould not send signal 0
Process 3275: (3) No such process
Squid: Error: cocould not send signal 0
Process 3275: (3) No such
Process
System restart problems still exist. Because the hard disk used is very small, it is suspected that there is no space. DF seems to use 100%, perspiration, and deleted the cache to free up space and restore to normal.
Set to clear cached files at every day
VI
/Etc/squid. freshcache
#! /Bin/sh
/Usr/bin/Sarg
Sleep
5S
Sync
Service squid stop
Sleep 5S
True>
/Var/log/squid/access. Log
True>/var/log/squid/cache. Log
True>
/Var/log/squid/store. Log
Rm-RF access. log .*
Rm-RF store. log .*
Sleep
5S
Sync
Rm-RF/var/spool/squid /*
Sleep 5S
Sync
Service squid
Start
Chmod A + x/etc/squid. freshcache
VI
/Etc/crontab
59 23 *** root/etc/squid. freshcache