最近發現某台 Server 的 CPU 一直很高。

檢查後發現是 logrotate 的問題。

先 killall logrotate,把正在執行的,但永遠跑不完的 logrotate 砍掉。

然後單獨執行 squid 的 logrotate

# logrotate -v squid

發現,他就停在 reading config info .....

 

Google 後,原來是

/var/lib/logrotate.status 

裡面的內容爆了,太多了。

真的是很怪的問題…

所以只要把 logrotate.status 清空。

再執行

# logrotate -v squid

這次就可以順利執行完了。



如果要把全部的都再跑一次,就執行

# logrotate -v /etc/logrotate.conf

 

搞定

 

 

 

 

 

arrow
arrow
    全站熱搜

    Ching-Wei 發表在 痞客邦 留言(0) 人氣()