psutil 4.0.0 发布

psutil 4.0.0 的新特性介绍

  1. 新增了进程内存真正使用信息

    psutil.Process().memory_full_info()
  2. 新增了进程环境变量功能

    >>> import psutil
    >>> from pprint import pprint as pp
    >>> pp(psutil.Process().environ())
    {...
     'CLUTTER_IM_MODULE': 'xim',
     'COLORTERM': 'gnome-terminal',
     'COMPIZ_BIN_PATH': '/usr/bin/',
     'HOME': '/home/giampaolo',
     'PWD': '/home/giampaolo/svn/psutil',
    }
    >>>
  3. 扩展了 disk IO 状态

    • busy_time, which is the time spent doing actual I/Os (in milliseconds).

    • read_merged_count and write_merged_count (Linux only), which is number of merged reads and writes (see iostats doc)

参考

    原文作者:yexiaobai
    原文地址: https://segmentfault.com/a/1190000004479369
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞