Documentation
¶
Index ¶
- Constants
- type CPU
- type Disk
- type DiskUsage
- type InodeUsage
- type Memory
- type Network
- type NetworkUsage
- type Process
- type Swap
- type SyStats
- func (systats *SyStats) CanConnectExternal(url string) (bool, error)
- func (systats *SyStats) EstablishedTCPConnCount(procName string) int
- func (systats *SyStats) GetCPU() (CPU, error)
- func (systats *SyStats) GetDisks() ([]Disk, error)
- func (systats *SyStats) GetMemory(unit string) (Memory, error)
- func (systats *SyStats) GetNetworkUsage(networkInterface string) NetworkUsage
- func (systats *SyStats) GetNetworks() ([]Network, error)
- func (systats *SyStats) GetSwap(unit string) (Swap, error)
- func (systats *SyStats) GetSystem() (System, error)
- func (systats *SyStats) GetTopProcesses(count int, sort string) ([]Process, error)
- func (systats *SyStats) IsPortOpen(port int) bool
- func (systats *SyStats) IsServiceRunning(service string) bool
- type System
- type User
Constants ¶
View Source
const ( Byte string = "B" Kilobyte string = "KB" Megabyte string = "MB" Gigabyte string = "GB" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPU ¶
type CPU struct {
LoadAvg int
CoreAvg []int
Model string
NoOfCores int
Freq string
Cache string
Time int64
}
CPU holds information on CPU and CPU usage
type Disk ¶
type Disk struct {
FileSystem string
Type string
MountedOn string
Usage DiskUsage
Inodes InodeUsage
Time int64
}
Disk holds information on single disk
type InodeUsage ¶
InodeUsage holds information on single disk inode usage
type Memory ¶
type Memory struct {
PercentageUsed float64
Available uint64
Free uint64
Used uint64
Time int64
Total uint64
Unit string
}
Memory holds information on system memory usage
type Network ¶
type Network struct {
Interface string
Ip string
Usage NetworkUsage
Time int64
}
Network holds interface information
type NetworkUsage ¶
NetworkUsage holds Tx/Rx usage information
type Swap ¶
type Swap struct {
PercentageUsed float64
Free uint64
Used uint64
Time int64
Total uint64
Unit string
}
Swap holds information on system swap usage
type SyStats ¶
type SyStats struct {
MeminfoPath string
StatFilePath string
CPUinfoFilePath string
VersionPath string
EtcPath string
UptimePath string
}
SyStats holds information used to collect data
func (*SyStats) CanConnectExternal ¶
func (*SyStats) EstablishedTCPConnCount ¶
func (*SyStats) GetNetworkUsage ¶
func (systats *SyStats) GetNetworkUsage(networkInterface string) NetworkUsage
func (*SyStats) GetNetworks ¶
func (*SyStats) GetTopProcesses ¶
func (*SyStats) IsPortOpen ¶
func (*SyStats) IsServiceRunning ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.