| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
y37f
10年前发布

可以监控指定进程的文件IO操作:pt-ioprofile

pt-ioprofile,可以监控指定进程的文件IO操作,统计出读写文件的次数、大小和耗时。当使用iotop发现某进程有超出预期的大量IO操作,可以用这个脚本定位具体访问的文件。

Usage

pt-ioprofile [OPTIONS] [FILE] 
</div>

pt-ioprofile does two things: 1) get lsof+strace for -s seconds, 2) aggregate the result. If you specify a FILE, then step 1) is not performed.

</div>

RISKS

WARNING: pt-ioprofile freezes the server and may crash the process, or make it perform badly after detaching, or leave it in a sleeping state! Before using this tool, please:

  • Read the tool’s documentation
  • Review the tool’s known “BUGS”
  • Test the tool on a non-production server
  • Backup your production server and verify the backups
pt-ioprofile should be considered an intrusive tool, and should not be used on production servers unless you understand and accept the risks.
</blockquote> </div>

DESCRIPTION

pt-ioprofile usesstraceandlsofto watch a process’s IO and print out a table of files and I/O activity. By default, it watches the mysqld process for 30 seconds. The output is like:

Tue Dec 27 15:33:57 PST 2011  Tracing process ID 1833       total read write      lseek  ftruncate filename    0.000150   0.000029   0.000068   0.000038   0.000015 /tmp/ibBE5opS
</div>

项目主页:http://www.open-open.com/lib/view/home/1426412292646

 本文由用户 y37f 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!