Documentation
¶
Index ¶
- Constants
- Variables
- func BeginStat() (bgTime *time.Time)
- func ClearStat()
- func CloseStat()
- func EndStat(typeName string, err error, bgTime *time.Time, statCount uint32) error
- func GetProcessMemory(pid int) (Virt, Res uint64, err error)
- func StatBandWidth(typeName string, Size uint32)
- func WriteStat() error
- type ShiftedFile
- type Statistic
Constants ¶
View Source
const ( Stat_Module = "mem_stat" FileNameDateFormat = "20060102150405" ShiftedExtension = ".old" PRO_MEM = "/proc/%d/status" F_OK = 0 MaxTimeoutLevel = 3 DefaultStatInterval = 60 // 60 seconds DefaultStatLogSize = 200 * 1024 * 1024 // 200M DefaultHeadRoom = 50 * 1024 // 50G MaxReservedDays = 7 * 24 * time.Hour )
Variables ¶
View Source
var DefaultTimeOutUs = [3]uint32{100000, 500000, 1000000}
Functions ¶
func GetProcessMemory ¶
func StatBandWidth ¶
Types ¶
type ShiftedFile ¶
func (ShiftedFile) Len ¶
func (f ShiftedFile) Len() int
func (ShiftedFile) Less ¶
func (f ShiftedFile) Less(i, j int) bool
func (ShiftedFile) Swap ¶
func (f ShiftedFile) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.