免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2592 | 回复: 0
打印 上一主题 下一主题

[MongoDB] mongodb 日志rotate [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-21 08:44 |只看该作者 |倒序浏览
要对mongodb的日志进行相应的rotate,要不然就造成浪费空间和文件过大了。<br><br>内部命令形式:<br><!--[if gte mso 9]><xml><w:WordDocument><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery><w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery><w:DocumentKind>DocumentNotSpecified</w:DocumentKind><w:DrawingGridVerticalSpacing>7.8</w:DrawingGridVerticalSpacing><w:View>Normal</w:View><w:Compatibility></w:Compatibility><w:Zoom>0</w:Zoom></w:WordDocument></xml><![endif]--><p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; ">&gt;&nbsp;db.runCommand("logRotate");</span><span style="font-size: 10.5pt; font-family: 'Times New Roman';"></span></p><p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><br></p><p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;">信号量形式:</p><p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><br></p><p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><!--[if gte mso 9]><xml><w:WordDocument><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery><w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery><w:DocumentKind>DocumentNotSpecified</w:DocumentKind><w:DrawingGridVerticalSpacing>7.8</w:DrawingGridVerticalSpacing><w:View>Normal</w:View><w:Compatibility></w:Compatibility><w:Zoom>0</w:Zoom></w:WordDocument></xml><![endif]--></p><p class="p0" style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; ">shell&gt;&nbsp;kill&nbsp;-SIGUSR1&nbsp;&lt;mongod&nbsp;process&nbsp;id&gt;</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; "></span></p><p class="p0" style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; "></span></p><p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><br><span style="font-size: 10.5pt; font-family: 'Times New Roman';"></span></p><p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><br><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; "></span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; "></span></p><p class="p0" style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; ">对系统上所有的mongodb进行rotate<br></p><p class="p0" style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; "><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; ">shell&gt;&nbsp;killall&nbsp;-SIGUSR1&nbsp;mongod</span><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; "></span></p><p class="p0" style="margin-bottom:0pt; margin-top:0pt; text-autospace:ideograph-other; "><br><span style="mso-spacerun:'yes'; font-size:10.5000pt; font-family:'Times New Roman'; "></span></p><br>
               
               
               
               
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP