2023-07-09 23:04:17 +08:00
|
|
|
package system
|
|
|
|
|
|
|
|
import "github.com/shirou/gopsutil/mem"
|
|
|
|
|
2023-07-15 23:29:03 +08:00
|
|
|
func (i *InfoUtils) GetVirtualMemory() *mem.VirtualMemoryStat {
|
2023-07-09 23:04:17 +08:00
|
|
|
stat, _ := mem.VirtualMemory()
|
|
|
|
return stat
|
|
|
|
}
|
|
|
|
|
2023-07-15 23:29:03 +08:00
|
|
|
func (i *InfoUtils) GetSwapMemory() *mem.SwapMemoryStat {
|
2023-07-09 23:04:17 +08:00
|
|
|
stat, _ := mem.SwapMemory()
|
|
|
|
return stat
|
|
|
|
}
|