summaryrefslogtreecommitdiff
path: root/apt.go
diff options
context:
space:
mode:
Diffstat (limited to 'apt.go')
-rw-r--r--apt.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/apt.go b/apt.go
index 65eb8e9..994c307 100644
--- a/apt.go
+++ b/apt.go
@@ -2,9 +2,6 @@ package zoopb
import (
"fmt"
- "runtime"
-
- "golang.org/x/sys/unix"
)
// init the installed package list
@@ -38,27 +35,3 @@ func (me *Machine) addNew(name string, version string) {
new1.Version = version
me.Packages.Append(new1)
}
-
-// simple memory and cpu count
-func (me *Machine) getMemory() {
- // 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)
-}