mirror of
https://github.com/snowykami/server-status-client.git
synced 2026-04-14 20:47:32 +00:00
Compare commits
4 Commits
2c3cda6e46
...
3fa94f653d
| Author | SHA1 | Date | |
|---|---|---|---|
| 3fa94f653d | |||
| 4cb1fcdb21 | |||
| 657cd1a80f | |||
| 3d14b5a18e |
@@ -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