Python中有没有流行的库来监控Linux/Unix系统?
在erlang中,有一个os_mon模块负责监控系统,但是我还没有找到像python那样的库,有吗? 非常感谢!
In erlang, thare is a os_mon module responsible for monitoring system, but I haven't found the library like that for python,is there any?
thank you very much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有两种方法可以实现此目的:
subprocess
调用另一个可以为您获取此信息的进程。Two ways of doing this:
subprocess
to call another process that can get this information for you.就像 Sukhbir 之前建议的那样,您可以通过使用 subprocess 调用另一个可以为您完成此操作的工具来超越 Python。看看Dstat。它以易于理解的格式返回大量指标,并且可能正好适合您的需求。
Dtat 主页 -
http://dag.wieers.com/home-made/dstat/
Like Sukhbir suggested earlier, you can look beyond python by using subprocess to invoke another tool that can do this for you. Look at Dstat. It returns a very large number of metrics in easily digestible format, and might just suit your needs.
The Dtat homepage -
http://dag.wieers.com/home-made/dstat/