feat: add kernel version text (#170)

This commit is contained in:
Stavros
2024-09-17 20:43:58 +03:00
committed by GitHub
parent ec95f63806
commit 9cccefd3fa
4 changed files with 18 additions and 0 deletions

View File

@@ -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

View File

@@ -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"`