Chinaunix首页 | 论坛 | 博客
  • 博客访问: 537357
  • 博文数量: 105
  • 博客积分: 6010
  • 博客等级: 准将
  • 技术积分: 1132
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 09:57
文章分类

全部博文(105)

文章存档

2011年(1)

2009年(41)

2008年(63)

我的朋友

分类: LINUX

2008-11-04 13:39:12

在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
阅读(4003) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~