版本封存

This commit is contained in:
zeaslity
2025-12-06 11:26:05 +08:00
parent 13949e1ba8
commit c0ae5e30c4
57 changed files with 2443 additions and 1428 deletions

View File

@@ -1,8 +1,8 @@
package services
package host_info
import (
"cmii-uav-watchdog-common/models"
"fmt"
"cmii-uav-watchdog-common/wdd_log"
"os"
"strconv"
"strings"
@@ -26,7 +26,7 @@ func GetMemoryInfo() models.MemoryInfo {
memInfo := NewMemoryInfo()
data, err := os.ReadFile("/proc/meminfo")
if err != nil {
fmt.Println("Error reading /proc/meminfo:", err)
wdd_log.Error("读取 /proc/meminfo 失败: %v", err)
return memInfo
}
@@ -39,7 +39,7 @@ func GetMemoryInfo() models.MemoryInfo {
key := fields[0]
value, err := strconv.ParseUint(fields[1], 10, 64)
if err != nil {
fmt.Printf("Error parsing value for %s: %v\n", key, err)
wdd_log.Error("解析 %s 的值失败: %v", key, err)
continue
}