該軟件是使用python2.7開發的,目的用於採集服務器性能數據。html
git地址 (https://github.com/NavInfo2/system-monitor.git)。python
sudo apt-get install nginx sudo apt-get install python2.7 sudo pip install flup==1.0 sudo pip install psutil
在/etc/nginx/sites-enabled/default的nginx配置中增長如下配置:nginx
location ~ ^/system_monitor/api/v1(?<path_info>/.*)$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; fastcgi_param PATH_INFO $path_info; fastcgi_pass unix:/etc/ncserver/system-monitor/.ncserver.sock; } location /nc/v1/system_monitor { alias /etc/ncserver/system-monitor/html; index index.html; }
配置完成後重啓nginxgit
sudo service nginx restart
git clone git@github.com:NavInfo2/system-monitor.git cd system-monitor sudo ./deploy.sh cd /etc/ncserver/system-monitor/ sudo python httpServer.py
在部署完成後,便可經過http://<host>/nc/v1/system_monitor/去訪問系統性能的在線展現圖。 github