添加系统启动时间

This commit is contained in:
远野千束 2024-10-04 07:46:00 +08:00
parent 657cd1a80f
commit 4cb1fcdb21

View File

@ -136,7 +136,7 @@ class Client:
self.link = link self.link = link
self.interval = interval self.interval = interval
self.start_time = int(psutil.boot_time()) self.start_time = psutil.boot_time()
self.hardware = Hardware() self.hardware = Hardware()
log("Client initialized", log("Client initialized",
@ -188,7 +188,7 @@ class Client:
"labels": self.labels, "labels": self.labels,
"location": self.location, "location": self.location,
"uptime": int(time.time() - self.start_time), "uptime": int(time.time() - self.start_time),
"start_time": self.start_time, # 系统启动的时间 "start_time": int(self.start_time), # 系统启动的时间
"link": self.link, "link": self.link,
"observed_at": int(time.time()), "observed_at": int(time.time()),
}, },