Documentation ¶
Overview ¶
*
- ______ __
- /\__ _\ /\ \
- \/_/\ \/ ___ __\ \ \ __ ___ ___ __
- \ \ \ / ___\ / __ \ \ \ __ / __ \ / _ \ / ___\ / __ \
- \_\ \__/\ \__//\ __/\ \ \_\ \/\ \_\ \_/\ \/\ \/\ \__//\ __/
- /\_____\ \____\ \____\\ \____/\ \__/ \_\ \_\ \_\ \____\ \____\
- \/_____/\/____/\/____/ \/___/ \/__/\/_/\/_/\/_/\/____/\/____/ * *
- @寒冰
- www.icezzz.cn
- hanbin020706@163.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNetInfo ¶ added in v0.1.7
func GetCpuPercent ¶ added in v0.1.8
func GetCpuPercent() float64
Types ¶
type CpuInfo ¶
type CpuInfo struct { ModelName string `json:"model_name" toml:"model_name"` Cores int32 `json:"cores" toml:"cores"` Mhz float64 `json:"mhz" toml:"mhz"` CacheSize int32 `json:"cache_size" toml:"cache_size"` }
func GetCpuInfo ¶
func GetCpuInfo() []*CpuInfo
type DiskInfo ¶
type DiskInfo struct { Fstype string `json:"fstype" toml:"fstype"` Total uint64 `json:"total" toml:"total"` Free uint64 `json:"free" toml:"free"` Used uint64 `json:"used" toml:"used"` UsedPercent float64 `json:"used_percent" toml:"used_percent"` }
func GetDiskInfo ¶
func GetDiskInfo() *DiskInfo
type HostInfo ¶
type HostInfo struct { Hostname string `json:"hostname" toml:"hostname"` OS string `json:"os" toml:"os"` Platform string `json:"platform" toml:"platform"` PlatformVersion string `json:"platform_version" toml:"platform_version"` KernelVersion string `json:"kernel_version" toml:"kernel_version"` KernelArch string `json:"kernel_arch" toml:"kernel_arch"` Hostid string `json:"hostid" toml:"hostid"` }
func GetHostInfo ¶
func GetHostInfo() *HostInfo
type MemInfo ¶
type MemInfo struct { Total int `json:"total" toml:"total"` Used int `json:"used" toml:"used"` Free int `json:"free" toml:"free"` UsedPercent float64 `json:"used_percent" toml:"used_percent"` }
func GetMemInfo ¶
func GetMemInfo() *MemInfo
type NetInfo ¶
type NetInfo struct { Name string `json:"name" toml:"name"` Hardwareaddr string `json:"hardwareaddr" toml:"hardwareaddr"` Addrs string `json:"addrs" toml:"addrs"` // contains filtered or unexported fields }
func (*NetInfo) GetNetSpeed ¶ added in v0.1.8
Click to show internal directories.
Click to hide internal directories.