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.
  • 相关阅读:
    关于连接connection reset的问题
    Redis应用场景及缓存问题
    zookeeper集群及kafka集群搭建
    使用自定义注解和切面AOP实现Java程序增强
    Shell脚本控制docker容器启动顺序
    正则表达式匹配${key}并在Java中使用
    Redis基本数据结构之ZSet
    Redis基本数据结构之Set
    Redis基本数据结构之Hash
    Redis基本数据结构之List
  • 原文地址:https://www.cnblogs.com/gtms/p/6741670.html
Copyright © 2011-2022 走看看