首页 > 系统服务 > 详细

Glances - Linux 上的实时系统监控工具

时间:2019-09-06 16:26:58      阅读:89      评论:0      收藏:0      [点我收藏+]
Glances  WebServer 模式

在 glances 的 WebServer 模式下,客户端只通过浏览器访问就可以获取远程服务器的运行状态。 
安装成功后,使用 glances -w 命令即可开启 WebServer 模式。
客户端使用浏览器访问 http://SERVER_IP:61208/ 进入监控界面。

创建glances-install.sh ,内容如下。(记得赋予执行权限:chmod +x glances-install.sh)

#!/bin/bash

echo "Installing glances..."
yum install -y glances

echo "Installing pip bottle..."
pip install bottle


(
cat <<EOF
[Unit]
Description = Glances in Web Server Mode
After = network.target
[Service]
ExecStart = /usr/bin/glances  -w  -t  5
[Install]
WantedBy = multi-user.target
EOF
) > /etc/systemd/system/glancesweb.service


systemctl enable glancesweb

echo "Starting glancesweb..."
systemctl start glancesweb

echo "=================Glancesweb started================"

 

 
 

Glances - Linux 上的实时系统监控工具

原文:https://www.cnblogs.com/Don/p/11475073.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!