895
38
3322
管理员
签到天数: 1643 天
[LV.Master]伴坛终老
yum install glances
wget https://files.pythonhosted.org/packages/d6/0f/96b7309212a926c1448366e9ce69b081ea79d63265bde33f11cc9cfc2c07/psutil-5.9.5.tar.gz tar xf psutil-5.9.5.tar.gz cd psutil-5.9.5 python3 setup.py install
yum install gcc python3-devel python3-pip -y python3 setup.py install #再次执行安装 pip3 install -U pip #更新pip3 接着我们再安装glances pip3 install galnces
glances -w
yum install python3-bottle
vim /etc/systemd/system/glancesweb.service
[Unit] Description = Glances in Web Server Mode After = network.target [Service] ExecStart = /usr/bin/glances -w -t 5 # glances路径因安装方法不同根据实际情况确定,可使用 which glances 命令获取 [Install] WantedBy = multi-user.target
systemctl enable glancesweb systemctl start glancesweb systemctl status glancesweb ● glancesweb.service - Glances in Web Server Mode Loaded: loaded (/etc/systemd/system/glancesweb.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2023-07-07 00:02:17 CST; 8min ago Main PID: 27912 (glances) Tasks: 1 (limit: 4915) CGroup: /system.slice/glancesweb.service └─27912 /home/starky/miniconda3/envs/python2/bin/python /home/starky/miniconda3/envs/python2/bin/glances -w -t 5
使用道具 举报
发表回复 回帖并转播 回帖后跳转到最后一页