[root@localhost ~]# python MySQL_watcher.py -p dbset.ini Traceback (most recent call last): File "mysql_watcher.py", line 17, in import psutil ImportError: No module named psutil
经查询,psutil是python的系统性能信息模块,正确的安装方法如下:
[root@localhost ~]# yum install python-setuptools Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: mirror.bit.edu.cn * extras: mirrors.btte.net * updates: mirror.bit.edu.cn Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package python-setuptools.noarch 0:0.6.10-3.el6 will be installed --> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================================= Package Arch Version Repository Size ============================================================================================================================================================= Installing: python-setuptools noarch 0.6.10-3.el6 base 336 k
Total download size: 336 k Installed size: 1.5 M Is this ok [y/N]: y Downloading Packages: python-setuptools-0.6.10-3.el6.noarch.rpm | 336 kB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : python-setuptools-0.6.10-3.el6.noarch 1/1 Verifying : python-setuptools-0.6.10-3.el6.noarch 1/1