Documentation ¶
Overview ¶
Package stat provides for counting system and process cpu and memory information, alarm notification support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlarmOption ¶
type AlarmOption func(*alarmOptions)
AlarmOption set the alarm options field.
func WithCPUThreshold ¶
func WithCPUThreshold(threshold float64) AlarmOption
WithCPUThreshold set cpu threshold, range 0 to 1
func WithMemoryThreshold ¶
func WithMemoryThreshold(threshold float64) AlarmOption
WithMemoryThreshold set memory threshold, range 0 to 1
type Option ¶
type Option func(*options)
Option set the stat options field.
func WithAlarm ¶
func WithAlarm(opts ...AlarmOption) Option
WithAlarm enable alarm and notify, except windows
func WithPrintField ¶ added in v1.0.5
WithPrintField set print field
func WithPrintInterval ¶
WithPrintInterval set print interval
Directories ¶
Path | Synopsis |
---|---|
Package cpu is a library that counts system and process cpu usage.
|
Package cpu is a library that counts system and process cpu usage. |
Package mem is a library that counts system and process memory usage.
|
Package mem is a library that counts system and process memory usage. |
Click to show internal directories.
Click to hide internal directories.