mirror of
https://github.com/snowykami/server-status-client.git
synced 2026-04-17 06:08:10 +00:00
Compare commits
5 Commits
v1.1.1
...
3fa94f653d
| Author | SHA1 | Date | |
|---|---|---|---|
| 3fa94f653d | |||
| 4cb1fcdb21 | |||
| 657cd1a80f | |||
| 3d14b5a18e | |||
| 2c3cda6e46 |
10
README.md
10
README.md
@@ -32,7 +32,15 @@ sudo apt install pipx
|
||||
sudo pipx install server-status
|
||||
```
|
||||
|
||||
若出现环境问题,请从 Actions 下载构建好的二进制文件
|
||||
若出现环境问题,手动部署
|
||||
```yaml
|
||||
git clone https://github.com/snowykami/server-status-client.git
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install pdm
|
||||
pdm install
|
||||
python main.py --your-args
|
||||
```
|
||||
|
||||
## 🎉 使用
|
||||
|
||||
|
||||
@@ -136,13 +136,13 @@ class Client:
|
||||
self.link = link
|
||||
self.interval = interval
|
||||
|
||||
self.start_time = psutil.boot_time()
|
||||
self.hardware = Hardware()
|
||||
|
||||
log("Client initialized",
|
||||
f"Name: {self.name}({self.client_id}), Location: {self.location}, Labels: {self.labels}")
|
||||
|
||||
def start(self):
|
||||
self.start_time = time.time()
|
||||
self.observe()
|
||||
|
||||
while True:
|
||||
@@ -187,6 +187,7 @@ class Client:
|
||||
"labels": self.labels,
|
||||
"location": self.location,
|
||||
"uptime": int(time.time() - self.start_time),
|
||||
"start_time": int(self.start_time), # 系统启动的时间
|
||||
"link": self.link,
|
||||
"observed_at": int(time.time()),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user