在HA部署中遇到这样子的问题,当客户需求中提到:日志硬盘大小,而机器一直都是在生成线上,由于空间有限,当把磁盘空间写满了,如何去清空旧日志呢?
If you're on OS X, the 'purge' command (part of the CHUD developer tools) will cause the disk caches to be purged. On Linux, with a 2.6.16 kernel or newer, 'echo 3 > /proc/sys/vm/drop_caches' will achieve the same effect. Another trick on Linux is to use a separate filesystem for the benchmark--if you perform a umount/mount cycle
after each run the kernel will drop any cached data that came from that filesystem.
两种方法:
echo 3 > /proc/sys/vm/drop_caches
umount /dev/sdx
参考:
http://www.gamedev.net/community/forums/topic.asp?topic_id=402069
http://blog.chinaunix.net/u/27173/showart_467689.html
阅读(4039) | 评论(0) | 转发(0) |