美文网首页
Linux 常用监控

Linux 常用监控

作者: 云石畅想 | 来源:发表于2019-09-28 14:27 被阅读0次

一、IO监控

查看进程级别的io占用

  1. pidstat -d 1 2


    image.png
  2. 测试磁盘读写IO

$ # bs=block-size  count=number-of-blocks  oflag=dsync
$ dd if=/dev/zero of=/tmp/output.img bs=8k count=256k
262144+0 records in
262144+0 records out
2147483648 bytes (2.1 GB) copied, 1.58114 s, 1.4 GB/s
$ rm /tmp/output.img

二、进程信息查看

  1. 查看进程下面的线程数量
ps hH p <pid>
ls /proc/<pid>/task
top -H -p <pid>

相关文章

网友评论

      本文标题:Linux 常用监控

      本文链接:https://www.haomeiwen.com/subject/guxeuctx.html