首页 > 编程语言 > 详细

跨平台的系统信息获取python库 - psutil

时间:2015-03-01 22:27:09      阅读:474      评论:0      收藏:0      [点我收藏+]

想写一个REST API来获取OS的CPU,内存等系统信息,正准备苦哈哈的轮一个 /proc/stat 的parser,发现了psutil ~ 一个跨平台的获取系统信息的python库,支持linux,windows,osx,sunos, 可以说很好,很全面,很pythonic


https://github.com/giampaolo/psutil


简介:

psutil (python system and process utilities) is a cross-platform library for retrieving information on running processes and system utilization(CPU, memory, disks, network) in Python. It is useful mainly for system monitoring, profiling and limiting process resources and management of running processes. It implements many functionalities offered by command line tools such as: ps, top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime, pidof, tty, taskset, pmap. It currently supportsLinux, Windows, OSX, FreeBSD and Sun Solaris, both 32-bit and64-bit architectures, with Python versions from 2.6 to 3.4 (users of Python 2.4 and 2.5 may use 2.1.3 version).PyPy is also known to work.


跨平台的系统信息获取python库 - psutil

原文:http://shinn1982.blog.51cto.com/9930914/1616305

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!