monitor

package
v0.5.45 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetMinActiveMB

func SetMinActiveMB(value int)

Types

type DomainMonStat

type DomainMonStat = GroupMBStats

DomainMonStat is memory bandwidth statistic info of one domain, each has multiple groups

func (DomainMonStat) String

func (d DomainMonStat) String() string

type DomainStats

type DomainStats struct {
	Incomings map[int]DomainMonStat
	Outgoings map[int]DomainMonStat

	// domain outgoing summary by groups
	OutgoingGroupSumStat map[string][]MBInfo
}

DomainStats keeps memory bandwidth monitored statistics in both directions of traffics

func NewDomainStats

func NewDomainStats(statOutgoing GroupMBStats, ccdToDomain map[int]int, xDomGroups sets.String) (*DomainStats, error)

NewDomainStats splits group-style outgoing mb stat (as from resctrl mon-data) into corresponding domains, and attributes incoming traffic from outgoings for the cross-domain groups

func (*DomainStats) String

func (d *DomainStats) String() string

type GroupMB

type GroupMB map[int]MBInfo

GroupMB keeps one group mb info, each group may have multiple ccds

func (GroupMB) HasTraffic

func (g GroupMB) HasTraffic() bool

func (GroupMB) SumStat

func (g GroupMB) SumStat() MBInfo

type GroupMBStats

type GroupMBStats map[string]GroupMB

GroupMBStats is memory bandwidth statistic info of multiple groups, each of the groups has multiple CCDs, in line with resctrl FS mon-group mon-data structure

func (GroupMBStats) NormalizeShareSubgroups

func (gms GroupMBStats) NormalizeShareSubgroups() (stats GroupMBStats, isSharedSubgroupConvention bool)

NormalizeShare changes subgroup names shared-xx to share-xx, and returns indition whether the group names use the old style of "shared-xx" conventions. Some resctrl FS may present share subgroup in "shared-xx" form; this conversion replaces with the desired form "share-xx"

type MBInfo

type MBInfo struct {
	LocalMB  int
	RemoteMB int
	TotalMB  int
}

MBInfo is mb of one unit (e.g. one ccd, or one domain, even whole machine)

Jump to

Keyboard shortcuts

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