Documentation ¶
Index ¶
- type ByteSize
- type CPUInfo
- type DiskStat
- type Free
- type HostName
- type Loadavg
- type Mem
- type Swap
- type Tcp
- type Traffic
- type Udp
- type Xminfo
- func (x *Xminfo) CPU() (info []*CPUInfo, err error)
- func (x *Xminfo) Disk() (disk []*DiskStat, err error)
- func (x *Xminfo) Host() (host *HostName, err error)
- func (x *Xminfo) Load() (load *Loadavg, err error)
- func (x *Xminfo) Memory() (free *Free, err error)
- func (x *Xminfo) Net() (traffic []*Traffic, err error)
- func (x *Xminfo) TCP() (tcp *Tcp, err error)
- func (x *Xminfo) UDP() (udp *Udp, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPUInfo ¶
type CPUInfo struct { Total int64 `json:"total"` User int64 `json:"user"` Nice int64 `json:"nice"` System int64 `json:"system"` Idle int64 `json:"idle"` Iowait int64 `json:"iowait"` Irq int64 `json:"irq"` Softirq int64 `json:"softirq"` }
CPUInfo cpu info struct.
type DiskStat ¶
type DiskStat struct { ID int64 `json:"id"` // 编号 SdName string `json:"sdname"` // 设备名称 RCompleNum int64 `json:"r_comple_num"` // 读完成次数 RCompleMergeNum int64 `json:"r_comple_merge_num"` // 合并完成就 RSectorsNum int64 `json:"r_sectors_num"` // 读扇区次数 RSpentMill int64 `json:"r_spent_mill"` // 读操作花费毫秒数 WConpleNum int64 `json:"w_conple_num"` // 写完成次数 WCompleMergeNum int64 `json:"w_comple_merge_num"` // 合并写完成次数 WSectirsNum int64 `json:"w_sectirs_num"` // 写扇区次数 WSpentMill int64 `json:"w_spent_mill"` // 写操作花费毫秒数 RWResquestNum int64 `json:"rw_resquest_num"` // 正在处理的输入/输出请求书 RWSpentMill int64 `json:"rw_spent_mill"` // 输入/输出操作花费的毫秒数 RWSpentMillW int64 `json:"rw_spent_mill_w"` // 输入/输出操作花费的加权毫秒数 }
DiskStat disk stat info struct.
type Free ¶
Free is mem info sum.
type HostName ¶
type HostName struct { Name string `json:"name"` Boot string `json:"boot"` Uptime string `json:"uptime"` }
HostName host name and boot time struct.
type Loadavg ¶
type Loadavg struct { La1 float64 `json:"la1"` La5 float64 `json:"la2"` La15 float64 `json:"la3"` Processes string `json:"processes"` MaxPid int64 `json:"max_pid"` }
Loadavg is load info struct.
type Mem ¶
type Mem struct { Total ByteSize `json:"total"` Used ByteSize `json:"used"` Free ByteSize `json:"free"` Buffers ByteSize `json:"buffers"` Cached ByteSize `json:"cached"` }
Mem is mem info struct.
type Swap ¶
type Swap struct { Total ByteSize `json:"total"` Used ByteSize `json:"used"` Free ByteSize `json:"free"` }
Swap is swap info struct.
type Tcp ¶
type Tcp struct { ActiveOpens int64 PassiveOpens int64 InSegs int64 OutSegs int64 RetransSegs int64 }
Tcp is tcp info struct.
type Traffic ¶
type Traffic struct { Name string `json:"name"` Receive int64 `json:"receive"` Transmit int64 `json:"transmit"` Time string `json:"time"` }
Traffic is net transmit info struct.
type Xminfo ¶
type Xminfo struct { }
Xminfo info finder.
Click to show internal directories.
Click to hide internal directories.