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 GoMemoryStat ¶ added in v0.4.7
type GoMemoryStat struct { Alloc uint64 `note:"已分配内存"` Sys uint64 `note:"已申请内存"` HeapAlloc uint64 `note:"堆已分配内存"` HeapInuse uint64 `note:"堆已使用内存"` HeapSys uint64 `note:"堆已申请内存"` StackInuse uint64 `note:"栈已使用内存"` StackSys uint64 `note:"栈已申请内存"` TotalAlloc uint64 `note:"累计已分配内存"` LastGC uint64 `note:"最后一次 GC 时间"` NumGC uint32 `note:"GC 执行次数"` }
func GoMemory ¶ added in v0.4.7
func GoMemory() *GoMemoryStat
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.