Documentation ¶
Index ¶
- func ConvertBytes(bytes uint64) (string, string)
- func FormatNumber(n int64) (string, string)
- func GetCPUStats() (cpu.TimesStat, error)
- func GetMEMStats() (mem.VirtualMemoryStat, error)
- func GetNetworkStats() (net.IOCountersStat, error)
- func GetSWAPStats() (mem.SwapMemoryStat, error)
- type ProcessInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertBytes ¶
func FormatNumber ¶
func GetCPUStats ¶
func GetMEMStats ¶
func GetMEMStats() (mem.VirtualMemoryStat, error)
func GetNetworkStats ¶
func GetNetworkStats() (net.IOCountersStat, error)
func GetSWAPStats ¶
func GetSWAPStats() (mem.SwapMemoryStat, error)
Types ¶
type ProcessInfo ¶
type ProcessInfo struct { PID int32 // Process ID Name string // Process name Username string Memory uint64 // Memory usage in string format CPUPercent float64 // CPU usage percentage RunningTime string }
func GetProcesses ¶
func GetProcesses(n int) ([]ProcessInfo, error)
Click to show internal directories.
Click to hide internal directories.