mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
add hostname to system info
This commit is contained in:
@@ -201,7 +201,7 @@ func (a *Agent) getSystemStats() (system.Info, system.Stats) {
|
||||
// add host info
|
||||
if info, err := host.Info(); err == nil {
|
||||
systemInfo.Uptime = info.Uptime
|
||||
// systemInfo.Os = info.OS
|
||||
systemInfo.Hostname = info.Hostname
|
||||
}
|
||||
// add cpu stats
|
||||
if info, err := cpu.Info(); err == nil && len(info) > 0 {
|
||||
|
@@ -45,6 +45,8 @@ type NetIoStats struct {
|
||||
}
|
||||
|
||||
type Info struct {
|
||||
Hostname string `json:"h"`
|
||||
|
||||
Cores int `json:"c"`
|
||||
Threads int `json:"t"`
|
||||
CpuModel string `json:"m"`
|
||||
|
Reference in New Issue
Block a user