zoukankan      html  css  js  c++  java
  • pidstat

    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.
  • 相关阅读:
    Qt中暂停线程的执行(主线程和工作线程共用一把锁,一旦主线程将它锁上,工作线程就无法运行了,这也是一个办法)
    罗振宇 知识就是力量:怎样逼自己成为一个上进的人
    GammaRay 是一个允许你查看 Qt 应用程序甚至在某种程度上修改它的独特应用,可谓是 Debugger 的良好补充
    VSCode高效开发插件
    微软白板Excel xls列号数字转字母
    如何渡过中年危机
    增量数据同步中间件
    N位N进制里有多少个N
    Orchard Core学习一
    Consul做服务发现
  • 原文地址:https://www.cnblogs.com/gtms/p/6741670.html
Copyright © 2011-2022 走看看