monitoring

package
v0.0.0-...-d3a2b01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CalculatedMetrics

type CalculatedMetrics struct {
	CPUTime   float64 `json:"cpu_time"`
	Vms       uint    `json:"virtual_memory_size"`
	Rss       int     `json:"resident_memory_size"`
	StartTime string  `json:"start_time"`
}

type Page

type Page struct {
	Addr                 uintptr `json:"addr"`
	PhysicalAddr         uint64  `json:"physical_addr"`
	Present              bool    `json:"present"`
	Swapped              bool    `json:"swapped"`
	PteSoftDirty         bool    `json:"pte_soft_dirty"`
	ExclusivelyMapped    bool    `json:"exclusively_mapped"`
	FilePageOrSharedAnon bool    `json:"file_page_or_shared_anon"`
}

func NewPage

func NewPage(virtualAddr uintptr) (*Page, error)

type PageMap

type PageMap struct {
	Regions []*Region `json:"regions"`
}

func NewPageMaps

func NewPageMaps(maps []*procfs.ProcMap) (*PageMap, error)

type ProcStat

type ProcStat struct {
	MeasuringTime string            `json:"measuring_time"`
	Cwd           string            `json:"cwd"`
	Environ       []string          `json:"environ"`
	ProcMaps      []*procfs.ProcMap `json:"maps"`
	PageMap       *PageMap          `json:"pagemap"`
	CalcMetrics   CalculatedMetrics `json:"calculated_metrics"`
	Stat          procfs.ProcStat   `json:"stat"`
}

type ProcStatObserver

type ProcStatObserver struct {
	// contains filtered or unexported fields
}

func NewProcStatObserver

func NewProcStatObserver() (*ProcStatObserver, error)

func (*ProcStatObserver) GetInfo

func (o *ProcStatObserver) GetInfo() (*ProcStat, error)

type Region

type Region struct {
	StartAddr            uintptr `json:"start_addr"`
	EndAddr              uintptr `json:"end_addr"`
	PagesCount           uint64  `json:"pages_count"`
	Present              uint64  `json:"present"`
	Swapped              uint64  `json:"swapped"`
	PteSoftDirty         uint64  `json:"pte_soft_dirty"`
	ExclusivelyMapped    uint64  `json:"exclusively_mapped"`
	FilePageOrSharedAnon uint64  `json:"file_page_or_shared_anon"`
	Undefined            uint64  `json:"undefined"`
	Pages                []*Page `json:"-"`
}

func NewRegion

func NewRegion(startAddr, endAddr uintptr) (*Region, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL