Documentation
¶
Overview ¶
Package monitor @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Package monitor @Link https://gitee.com/linngc/center.gf @Copyright Copyright (c) 2022 center CLI @Author linngc @License
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GoVersionOutput ¶
type GoVersionOutput struct {
GoVersion string `json:"goVersion" dc:"Go框架版本"` //Go框架版本
GoHome string `json:"goHome" dc:"安装路径"` //安装路径
GoRunTime int64 `json:"goRunTime" dc:"运行时长"` //运行时长(nano)
}
GoVersionOutput 当前服务器go版本信息
type HttpTime ¶
type HttpTime struct {
DnsTime time.Duration `json:"dnsTime" dc:"dns响应时间"`
ConnectTime time.Duration `json:"connectTime" dc:"链接时间"`
ResponseTime time.Duration `json:"responseTime" dc:"请求响应时间"`
TotalTime time.Duration `json:"totalTime" dc:"总耗时"`
}
HttpTime 请求到响应花费的时间
type MonitorOutput ¶
type MonitorOutput struct {
GoVersionOutput *GoVersionOutput `json:"goVersion" dc:"当前服务器go版本信息"` //当前服务器go版本信息
VersionOutput *VersionOutput `json:"version" dc:"当前程序版本信息"` //当前程序版本信息
ServerInfoOutput *ServerOutput `json:"serverInfo" dc:"当前服务器信息"` //当前服务器信息
DisksList []*disk.UsageStat `json:"disksList" dc:"当前磁盘状态"` //当前磁盘状态
}
MonitorOutput 服务监控信息
type ProcessOutput ¶
type ProcessOutput struct {
Percent float64 `json:"percent" dc:"返回进程的cpu使用率"` //返回进程的cpu使用率
CpuPercent float64 `json:"cpuPercent" dc:"CPU使用率"` //CPU使用率
Status string `json:"status" dc:"返回进程状态"` //返回进程状态
Connections []gopsutilnet.ConnectionStat `json:"connections" dc:"返回进程连接"` //返回进程连接
Times *cpu.TimesStat `json:"times" dc:"返回进程的timeStat信息"` //返回进程的timeStat信息
Name string `json:"name" dc:"进程名称"` //进程名称
CreateTime int64 `json:"createTime" dc:"进程创建时间"` //进程创建时间
Children []*process.Process `json:"children" dc:"获取进程的子进程"` //获取进程的子进程
Cmdline string `json:"cmdline" dc:"获取进程的命令行"` //获取进程的命令行
}
ProcessOutput 当前服务器进程状态
type ServerOutput ¶
type ServerOutput struct {
MemAll uint64 `json:"memAll" dc:"所有内存(MB)"` // 所有内存
MemFree uint64 `json:"memFree" dc:"可用内存(MB)"` // 可用内存
MemUsed uint64 `json:"memUsed" dc:"使用内存(MB)"` // 使用内存
MemUsedPercent float64 `json:"memUsedPercent" dc:"内存使用占比(%)"` // 内存使用占比
Minutes int64 `json:"minutes" dc:"开机时间(min分钟)"` // 开机时间(分钟)
CpuUsedPercent float64 `json:"cpuUsedPercent" dc:" CPU使用占比(%,200ms内信息)"` // CPU使用占比
Os string `json:"os" dc:"系统版本(Win或Linux)"` // 系统版本(Win或Linux)
Arch string `json:"arch" dc:"系统类型(X64或X32)"` // 系统类型(X64或X32)
CpuCores int `json:"cpuCores" dc:"CPU内核数"` // CPU内核数
SysTime time.Time `json:"sysTime" dc:"当前系统时间"` // 当前系统时间
Interface []net.Interface `json:"interfaces" dc:"网卡信息"` //网卡信息
}
ServerOutput 当前服务器信息
type VerifyOutput ¶
type VersionOutput ¶
type VersionOutput struct {
Pid int `json:"pid" dc:"项目启动进程号"` //项目启动进程号
StartTime time.Time `json:"startTime" dc:"程序启动时间"` //程序启动时间
Os string `json:"os" dc:"系统版本(Win或Linux)"` //系统版本(Win或Linux)
Arch string `json:"arch" dc:"系统类型(X64或X32)"` //系统类型(X64或X32)
BuildVer string `json:"buildVer" dc:"编译版本"` //编译版本
}
VersionOutput 当前程序版本信息
Click to show internal directories.
Click to hide internal directories.