Documentation
¶
Index ¶
- Constants
- func GetMonFeatures() map[MonResource][]string
- func Initialize() error
- func MonSupported() bool
- func NewCollector() (prometheus.Collector, error)
- func RegisterCustomPrometheusLabels(names ...string)
- type Bitmask
- type CtrlGroup
- type MonData
- type MonGroup
- type MonL3Data
- type MonLeafData
- type MonResource
- type ResctrlGroup
Constants ¶
const ( // ConfigModuleName is the configuration section of blockio class definitions ConfigModuleName = "rdt" // RootClassName is the name we use in our config for the special class // that configures the "root" resctrl group of the system RootClassName = "SYSTEM_DEFAULT" )
Variables ¶
This section is empty.
Functions ¶
func GetMonFeatures ¶
func GetMonFeatures() map[MonResource][]string
GetMonFeatures returns the available monitoring stats of each available monitoring technology
func Initialize ¶
func Initialize() error
Initialize discovers RDT support and initializes the rdtControl singleton interface NOTE: should only be called once in order to avoid adding multiple notifiers TODO: support make multiple initializations, allowing e.g. "hot-plug" when
resctrl filesystem is mounted
func MonSupported ¶
func MonSupported() bool
MonSupported returns true if RDT monitoring features are available
func NewCollector ¶
func NewCollector() (prometheus.Collector, error)
NewCollector creates new Prometheus collector of RDT metrics
func RegisterCustomPrometheusLabels ¶
func RegisterCustomPrometheusLabels(names ...string)
RegisterCustomPrometheusLabels registers monitor group annotations to be exported as Prometheus metrics labels
Types ¶
type Bitmask ¶
type Bitmask uint64
Bitmask represents a generic 64 bit wide bitmask
func ListStrToBitmask ¶
ListStrToBitmask parses a string containing a human-readable list of bit numbers into a bitmask
func (Bitmask) ListStr ¶
ListStr prints the bitmask in human-readable format, similar to e.g. the cpuset format of the Linux kernel
func (Bitmask) MarshalJSON ¶
MarshalJSON implements the Marshaler interface of "encoding/json"
type CtrlGroup ¶
type CtrlGroup interface {
ResctrlGroup
// CreateMonGroup creates a new monitoring group under the class.
CreateMonGroup(name string, annotations map[string]string) (MonGroup, error)
// DeleteMonGroup deletes a monitoring group from the class.
DeleteMonGroup(name string) error
// GetMonGroup returns a specific monitoring group under the class
GetMonGroup(name string) (MonGroup, bool)
// GetMonGroups returns all monitoring groups under the class
GetMonGroups() []MonGroup
}
CtrlGroup defines the interface of one cri-resmgr managed RDT class
type MonData ¶
type MonData struct {
L3 MonL3Data
}
MonData contains monitoring stats of one monitoring group
type MonGroup ¶
type MonGroup interface {
ResctrlGroup
// Parent returns the CtrlGroup under which the monitoring group exists
Parent() CtrlGroup
// GetAnnotations returns the annotations stored to the monitoring group
GetAnnotations() map[string]string
}
MonGroup represents the interface to a RDT monitoring group
type MonL3Data ¶
type MonL3Data map[uint64]MonLeafData
MonL3Data contains L3 monitoring stats of one monitoring group
type MonLeafData ¶
MonLeafData represents the raw numerical stats from one RDT monitor data leaf
type MonResource ¶
type MonResource string
MonResource is the type of RDT monitoring resource
const ( // MonResourceL3 is the RDT L3 cache monitor resource MonResourceL3 MonResource = "l3" )
type ResctrlGroup ¶
type ResctrlGroup interface {
// Name returns the name of the group
Name() string
// GetPids returns the process ids assigned to the group
GetPids() ([]string, error)
// AddPids assigns the given process ids to the group
AddPids(pids ...string) error
// GetMonData retrieves the monitoring data of the group
GetMonData() MonData
}
ResctrlGroup is the generic interface for resctrl CTRL and MON groups