码迷,mamicode.com
首页 > 其他好文 > 详细

pidstat

时间:2017-05-01 10:01:34      阅读:352      评论:0      收藏:0      [点我收藏+]

标签:flush   bash   count   can   man   dev   poll   virt   nts   

pidstat

- Report statistics for Linux tasks.

[root@node85 ~
]# pidstat Linux 2.6.32-573.el6.x86_64 (node85) 01/31/2017 _x86_64_ (1 CPU) 09:57:53 PM PID %usr %system %guest %CPU CPU Command 09:57:53 PM 1 0.00 0.01 0.00 0.01 0 init 09:57:53 PM 6 0.00 0.00 0.00 0.00 0 watchdog/0 09:57:53 PM 7 0.00 0.05 0.00 0.05 0 events/0 09:57:53 PM 16 0.00 0.00 0.00 0.00 0 sync_supers 09:57:53 PM 17 0.00 0.00 0.00 0.00 0 bdi-default 09:57:53 PM 19 0.00 0.00 0.00 0.00 0 kblockd/0 09:57:53 PM 35 0.00 0.01 0.00 0.01 0 khugepaged 09:57:53 PM 230 0.00 0.00 0.00 0.00 0 mpt_poll_0 09:57:53 PM 446 0.00 0.00 0.00 0.00 0 jbd2/sda2-8 09:57:53 PM 468 0.00 0.00 0.00 0.00 0 flush-8:0 09:57:53 PM 541 0.00 0.00 0.00 0.00 0 udevd 09:57:53 PM 756 0.00 0.00 0.00 0.00 0 vmmemctl 09:57:53 PM 1263 0.00 0.00 0.00 0.00 0 auditd 09:57:53 PM 1285 0.00 0.00 0.00 0.00 0 rsyslogd 09:57:53 PM 1404 0.00 0.00 0.00 0.00 0 hald 09:57:53 PM 1553 0.00 0.00 0.00 0.00 0 master 09:57:53 PM 1594 0.00 0.00 0.00 0.00 0 crond 09:57:53 PM 1648 0.00 0.01 0.00 0.01 0 sshd 09:57:53 PM 1650 0.00 0.00 0.00 0.00 0 bash 09:57:53 PM 1814 0.00 0.00 0.00 0.00 0 bash 09:57:53 PM 1981 0.00 0.00 0.00 0.01 0 python

 

常用参数

-r     Report page faults and memory utilization.
-u     Report CPU utilization.
-d     Report I/O statistics
-p     pid

 

以pid号统计其内存、CPU、I/O

[root@node85 ~]# pidstat -r -d -u -p 1981
Linux 2.6.32-573.el6.x86_64 (node85)    01/31/2017      _x86_64_        (1 CPU)

10:00:33 PM       PID    %usr %system  %guest    %CPU   CPU  Command
10:00:33 PM      1981    0.00    0.00    0.00    0.01     0  python
#Virtual Size: The virtual memory usage of entire task in kilobytes.
#Resident Set Size: The non-swapped physical memory used by the task in kilobytes.

10:00:33 PM PID minflt/s majflt/s VSZ RSS %MEM Command 10:00:33 PM 1981 0.14 0.00 179668 7960 0.79 python 10:00:33 PM PID kB_rd/s kB_wr/s kB_ccwr/s Command 10:00:33 PM 1981 0.00 0.00 0.00 python
kB_rd/s    Number of kilobytes the task has caused to be read from disk per second.
kB_wr/s    Number of kilobytes the task has caused, or shall cause to be written to disk per second.
kB_ccwr/s Number of kilobytes whose writing to disk has been cancelled by  the  task.
                     This  may occur when the task truncates some dirty pagecache. In this case,
                     some IO which another task has been accounted for will not be happening.

 

pidstat

标签:flush   bash   count   can   man   dev   poll   virt   nts   

原文地址:http://www.cnblogs.com/gtms/p/6741670.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!