升級python後,iotop出現的問題
阿新 • • 發佈:2019-01-03
1升級到系統python為2.7.11,使用iotop顯示
]# iotop
No module named iotop.ui
To run an uninstalled copy of iotop,
launch iotop.py in the top directory
檢視iotop命令路徑
which iotop
進入看下具體檔案寫的是啥
vim /usr/sbin/iotop
#!/usr/bin/python
# iotop: Display I/O usage of processes in a top like UI
# Copyright (c) 2007, 2008 Guillaume Chazarain < [email protected]>, GPLv2
# See iotop --help for some help
import sys
try:
from iotop.ui import main
except ImportError, e:
print e
print 'To run an uninstalled copy of iotop,'
print 'launch iotop.py in the top directory'
else:
try:
main()
except KeyboardInterrupt:
pass
sys.exit(0)
======================================
修改這裡的python變數路徑
#!/usr/bin/python2.6
當然前提是你裝新的python2.7的時候,將老的python備份成了python2.6了