[agent-wdd] 小小新增部分内容

This commit is contained in:
zeaslity
2025-02-27 17:19:36 +08:00
parent b6cc5abc63
commit c10554c218
7 changed files with 15 additions and 46 deletions

View File

@@ -8,6 +8,7 @@ import (
"os"
"path/filepath"
"strings"
"syscall"
)
var CommonDiskPath = []string{
@@ -81,8 +82,8 @@ func DiskListGather() {
}
func (disk *Disk) calculateDiskUsage() {
var stat unix.Statfs_t
err := unix.Statfs(disk.Path, &stat)
var stat syscall.Statfs_t
err := syscall.Statfs(disk.Path, &stat)
if err != nil {
log.Error("disk syscall error: %v", err)
disk.Size = "0B"