Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogCrash ¶ added in v1.8.1
func LogCrash(r interface{})
LogCrash write down the current memory and stack info and the cpu/mem/disk infos into log dir
func SetCrashlogDir ¶ added in v1.8.1
SetCrashlogDir set the directory of crashlog
Types ¶
type CPUInfo ¶
type CPUInfo struct { PhysicalCount int `json:"physical_count"` LogicalCount int `json:"logical_count"` TotalPercent []float64 `json:"total_use_percent"` PerPercent []float64 `json:"per_use_percent"` Loads *load.AvgStat `json:"average_loads"` Times []cpu.TimesStat `json:"running_times"` Infos []cpu.InfoStat `json:"infos"` }
CPUInfo stat cpu infos
type DiskInfo ¶
type DiskInfo struct { IOCounters map[string]disk.IOCountersStat `json:"io_counters"` Partitions []disk.PartitionStat `json:"partitions"` }
DiskInfo stat disk infos
type MemInfo ¶
type MemInfo struct { Virtual *mem.VirtualMemoryStat `json:"virtaul"` Swap *mem.SwapMemoryStat `json:"swap"` }
MemInfo stat memory infos
Click to show internal directories.
Click to hide internal directories.