From d110888f81e357010b71a0a0286ba298fcd452c5 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 7 Oct 2025 09:01:54 -0500 Subject: moved to go.wit.com/lib/debian --- hw_linux.go | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 hw_linux.go (limited to 'hw_linux.go') diff --git a/hw_linux.go b/hw_linux.go deleted file mode 100644 index d3cb116..0000000 --- a/hw_linux.go +++ /dev/null @@ -1,32 +0,0 @@ -package zoopb - -import ( - "fmt" - "runtime" - - "golang.org/x/sys/unix" -) - -// simple memory and cpu count -func (me *Machine) osGetMemory() { - // Get number of CPUs - numCPUs := runtime.NumCPU() - - // Get total system memory - var sysInfo unix.Sysinfo_t - err := unix.Sysinfo(&sysInfo) - if err != nil { - fmt.Println("Error getting system info:", err) - return - } - - // Convert memory from bytes to GB - m := float64(sysInfo.Totalram) * float64(sysInfo.Unit) - me.Memory = int64(m) - me.Cpus = int64(numCPUs) - - // totalMemGB := float64(sysInfo.Totalram) * float64(sysInfo.Unit) / (1024 * 1024 * 1024) - // Print results - // fmt.Printf("Total Memory: %.2f GB\n", totalMemGB) - // fmt.Printf("Number of CPUs: %d\n", numCPUs) -} -- cgit v1.2.3