mirror of https://github.com/cppla/ServerStatus
The io_counters is not available on OS X, 兼容处理
parent
25917f0883
commit
34b1bca5b1
|
@ -206,6 +206,10 @@ def _disk_io():
|
||||||
如果这里做连续性IO,那么普通机械硬盘写入到100Mb/s,那么也能造成硬盘长时间的等待。
|
如果这里做连续性IO,那么普通机械硬盘写入到100Mb/s,那么也能造成硬盘长时间的等待。
|
||||||
磁盘读写有误差:4k,8k ,https://stackoverflow.com/questions/34413926/psutil-vs-dd-monitoring-disk-i-o
|
磁盘读写有误差:4k,8k ,https://stackoverflow.com/questions/34413926/psutil-vs-dd-monitoring-disk-i-o
|
||||||
"""
|
"""
|
||||||
|
if "darwin" in sys.platform:
|
||||||
|
diskIO["read"] = 0
|
||||||
|
diskIO["write"] = 0
|
||||||
|
else:
|
||||||
while True:
|
while True:
|
||||||
# first get a list of all processes and disk io counters
|
# first get a list of all processes and disk io counters
|
||||||
procs = [p for p in psutil.process_iter()]
|
procs = [p for p in psutil.process_iter()]
|
||||||
|
|
Loading…
Reference in New Issue