Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudInstanceId ¶
func CloudInstanceId() string
func InterfaceAddrs ¶
func PublicAddress ¶
Types ¶
type DetailStat ¶
type DetailStat struct {
*SummaryStat
CpuModel []string `note:"CPU 型号"`
NetInterface []NetInterface `note:"网卡信息"`
NetBytesRecv uint64 `note:"网卡接收字节数"`
NetBytesSent uint64 `note:"网卡发送字节数"`
DiskPartition []DiskPartition `note:"磁盘分区信息"`
DiskTotal uint64 `note:"磁盘总量"`
DiskUsed uint64 `note:"磁盘使用量"`
SwapTotal uint64 `note:"交换分区总量"`
SwapUsed uint64 `note:"交换分区使用量"`
}
func Detail ¶
func Detail(withAddr bool) *DetailStat
type DiskPartition ¶
type NetInterface ¶
type SummaryStat ¶
type SummaryStat struct {
CreateAt int64 `note:"创建时间"`
HostId string `note:"主机 ID"`
HostName string `note:"主机名"`
Uptime uint64 `note:"运行时间"`
OS string `note:"操作系统"`
Platform string `note:"平台"`
KernelArch string `note:"内核架构"`
CpuCore int `note:"CPU 核心数"`
CpuCoreLogic int `note:"CPU 逻辑核心数"`
CpuPercent []float64 `note:"CPU 使用率"`
MemoryTotal uint64 `note:"内存总量"`
MemoryUsed uint64 `note:"内存使用量"`
PublicIpv4 string `note:"公网 IPV4"`
PublicIpv6 string `note:"公网 IPV6"`
}
func Summary ¶
func Summary(withAddr bool) *SummaryStat
func (*SummaryStat) From ¶
func (p *SummaryStat) From(s string)
func (*SummaryStat) String ¶
func (p *SummaryStat) String() string
Click to show internal directories.
Click to hide internal directories.