Documentation
¶
Index ¶
- Constants
- func DiscoverClasses(resctrlGroupPrefix string) error
- func GetMonFeatures() map[MonResource][]string
- func Initialize(resctrlGroupPrefix string) error
- func MonSupported() bool
- func NewCollector() (prometheus.Collector, error)
- func RegisterCustomPrometheusLabels(names ...string)
- func SetConfig(c *Config, force bool) error
- func SetLogger(l Logger)
- type Bitmask
- type Config
- type CtrlGroup
- type Logger
- type MonData
- type MonGroup
- type MonL3Data
- type MonLeafData
- type MonResource
- type Options
- type ResctrlGroup
Constants ¶
const ( L2 cacheLevel = "L2" L3 cacheLevel = "L3" )
const ( // 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 DiscoverClasses ¶
DiscoverClasses discovers existing classes from the resctrl filesystem. Makes it possible to discover gropus with another prefix than was set with Initialize(). The original prefix is still used for monitoring groups.
func GetMonFeatures ¶
func GetMonFeatures() map[MonResource][]string
GetMonFeatures returns the available monitoring stats of each available monitoring technology
func Initialize ¶
Initialize discovers RDT support and initializes the rdtControl singleton interface
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 Config ¶
type Config struct { Options Options `json:"options"` Partitions map[string]struct { L2Allocation interface{} `json:"l2Allocation"` L3Allocation interface{} `json:"l3Allocation"` MBAllocation interface{} `json:"mbAllocation"` Classes map[string]struct { L2Schema interface{} `json:"l2Schema"` L3Schema interface{} `json:"l3Schema"` MBSchema interface{} `json:"mbSchema"` } `json:"classes"` } `json:"partitions"` }
Config represents the raw RDT configuration data from the configmap
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 // DeleteMonGroups deletes all monitoring groups. DeleteMonGroups() 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 goresctrl managed RDT class
type Logger ¶
type Logger interface { Debug(format string, v ...interface{}) Info(format string, v ...interface{}) Warn(format string, v ...interface{}) Error(format string, v ...interface{}) Panic(format string, v ...interface{}) Fatal(format string, v ...interface{}) DebugBlock(prefix, format string, v ...interface{}) InfoBlock(prefix, format string, v ...interface{}) }
Logger is the logging interface for goresctl
func NewLoggerWrapper ¶
NewLoggerWrapper wraps an implementation of the golang standard intreface into a goresctl specific compatible logger interface
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 Options ¶
type Options struct { L2 catOptions `json:"l2"` L3 catOptions `json:"l3"` MB mbOptions `json:"mb"` }
Options contains the common settings for all classes
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