Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNodeIP ¶
func GetNodeIP() string
GetNodeIP fetches node ip via command hostname. If it fails to get this, return empty string directly.
func GetOSName ¶
GetOSName gets data in /etc/os-release and gets OS name. For example, in a Ubuntu host, fetched data are like: root@i-8brpbc9t:~# cat /etc/os-release NAME="Ubuntu" VERSION="16.04.2 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.2 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial
func GetSerialNumber ¶
func GetSerialNumber() string
GetSerialNumber gets serial number or a machine.
Types ¶
type BlkioCgroupInfo ¶
type BlkioCgroupInfo struct { BlkioWeight bool BlkioWeightDevice bool BlkioDeviceReadBps bool BlkioDeviceWriteBps bool BlkioDeviceReadIOps bool BlkioDeviceWriteIOps bool }
BlkioCgroupInfo defines blkio cgroup information on current machine
type CPUCgroupInfo ¶
CPUCgroupInfo defines cpu cgroup information on current machine
type CgroupInfo ¶
type CgroupInfo struct { Memory *MemoryCgroupInfo CPU *CPUCgroupInfo Blkio *BlkioCgroupInfo Pids *PidsCgroupInfo }
CgroupInfo defines cgroup information on current machine
type Info ¶
type Info struct { AppArmor bool Seccomp bool *CgroupInfo }
Info defines system info on current machine
type MemoryCgroupInfo ¶
type MemoryCgroupInfo struct { MemoryLimit bool MemoryReservation bool MemorySwap bool MemorySwappiness bool OOMKillDisable bool }
MemoryCgroupInfo defines memory cgroup information on current machine
type PidsCgroupInfo ¶
type PidsCgroupInfo struct {
Pids bool
}
PidsCgroupInfo defines pid cgroup information on current machine