mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
feat: add kernel version text (#170)
This commit is contained in:
@@ -206,7 +206,9 @@ func (a *Agent) getSystemStats() (system.Info, system.Stats) {
|
||||
if info, err := host.Info(); err == nil {
|
||||
systemInfo.Uptime = info.Uptime
|
||||
systemInfo.Hostname = info.Hostname
|
||||
systemInfo.KernelVersion = info.KernelVersion
|
||||
}
|
||||
|
||||
// add cpu stats
|
||||
if info, err := cpu.Info(); err == nil && len(info) > 0 {
|
||||
systemInfo.CpuModel = info[0].ModelName
|
||||
|
@@ -46,6 +46,7 @@ type NetIoStats struct {
|
||||
|
||||
type Info struct {
|
||||
Hostname string `json:"h"`
|
||||
KernelVersion string `json:"k"`
|
||||
|
||||
Cores int `json:"c"`
|
||||
Threads int `json:"t"`
|
||||
|
Reference in New Issue
Block a user