获取系统资源使用率

注册为服务


G2

sudo nano /etc/systemd/system/ai-jk.service
[Unit]
Description=Client2 Service
After=network.target

[Service]
ExecStart=/root/python-usage/client2
Restart=always
User=root
WorkingDirectory=/root/python-usage

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload
sudo systemctl enable ai-jk
sudo systemctl start ai-jk
sudo systemctl status ai-jk


image.png

G3

sudo nano /etc/systemd/system/g3jk.service

[Unit]
Description=Server Service
After=network.target

[Service]
ExecStart=/root/tmpfile/server
Restart=always
User=root
WorkingDirectory=/root/tmpfile

[Install]
WantedBy=multi-user.target

sudo systemctl daemon-reload
sudo systemctl enable g3jk
sudo systemctl start g3jk

image.png

监控服务固定地址

G1由于有虚拟GPU无法获取实用信息
路由
/update_status
/full_status

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.