Documentation ¶
Index ¶
- Constants
- func APIServerEnabled() bool
- func CPUArchOverride() string
- func ContainerComponentsPowerKey() string
- func ContainerPlatformPowerKey() string
- func CoreUsageMetric() string
- func DCGMHostEngineEndpoint() string
- func DRAMUsageMetric() string
- func EnabledEBPFCgroupID() bool
- func EnabledGPU() bool
- func ExposeHardwareCounterMetrics() bool
- func ExposeIRQCounterMetrics() bool
- func GPUUsageMetric() string
- func GeneralUsageMetric() string
- func GetBPFSampleRate() int
- func GetBindAddress(cmdSet string) string
- func GetCGroupVersion() int
- func GetDefaultPowerModelURL(modelOutputType, energySource string) string
- func GetLibvirtMetadataToken() string
- func GetLibvirtMetadataURI() string
- func GetMetricPath(cmdSet string) string
- func GetMockACPIPowerPath() string
- func GetModelConfigMap() map[string]string
- func GetRedfishCredFilePath() string
- func GetRedfishProbeIntervalInSeconds() int
- func GetRedfishSkipSSLVerify() bool
- func InitModelConfigMap()
- func IsEnabledMSR() bool
- func IsExposeBPFMetricsEnabled() bool
- func IsExposeComponentPowerEnabled() bool
- func IsExposeContainerStatsEnabled() bool
- func IsExposeProcessStatsEnabled() bool
- func IsExposeVMStatsEnabled() bool
- func IsIdlePowerEnabled() bool
- func IsModelServerEnabled() bool
- func KubeConfig() string
- func LogConfigs()
- func ModelConfigValues(k string) string
- func ModelServerEndpoint() string
- func NodeComponentsPowerKey() string
- func NodePlatformPowerKey() string
- func ProcessComponentsPowerKey() string
- func ProcessPlatformPowerKey() string
- func SamplePeriodSec() uint64
- func SetConfig(conf *Config)
- func SetEnableAPIServer(enabled bool)
- func SetEnabledEBPFCgroupID(enabled bool)
- func SetEnabledGPU(enabled bool)
- func SetEnabledHardwareCounterMetrics(enabled bool)
- func SetEnabledIdlePower(enabled bool)
- func SetEnabledMSR(enabled bool)
- func SetEstimatorConfig(modelName, selectFilter string)
- func SetGPUUsageMetric(metric string)
- func SetKubeConfig(k string)
- func SetMachineSpecFilePath(specFilePath string)
- func SetModelServerEnable(enabled bool)
- func SetModelServerEndpoint(serverEndpoint string)
- func SetRedfishCredFilePath(credFilePath string)
- func SetRedfishProbeIntervalInSeconds(interval string)
- func SetRedfishSkipSSLVerify(skipSSLVerify bool)
- type Client
- type Config
- type KeplerConfig
- type LibvirtConfig
- type MachineSpec
- type MetricsConfig
- type ModelConfig
- type RedfishConfig
Constants ¶
const ( CORE = "core" DRAM = "dram" UNCORE = "uncore" PKG = "package" GPU = "gpu" OTHER = "other" PLATFORM = "platform" FREQUENCY = "frequency" // counter - attacher package CPUCycle = "cpu_cycles" CPURefCycle = "cpu_ref_cycles" CPUInstruction = "cpu_instructions" CacheMiss = "cache_miss" // bpf - attacher package CPUTime = "bpf_cpu_time_ms" PageCacheHit = "bpf_page_cache_hit" IRQNetTXLabel = "bpf_net_tx_irq" IRQNetRXLabel = "bpf_net_rx_irq" IRQBlockLabel = "bpf_block_irq" // GPU GPUComputeUtilization = "gpu_compute_util" GPUMemUtilization = "gpu_mem_util" // Energy Metrics // Absolute energy and power AbsEnergyInCore = "abs_energy_in_core" AbsEnergyInDRAM = "abs_energy_in_dram" AbsEnergyInUnCore = "abs_energy_in_uncore" AbsEnergyInPkg = "abs_energy_in_pkg" AbsEnergyInGPU = "abs_energy_in_gpu" AbsEnergyInOther = "abs_energy_in_other" AbsEnergyInPlatform = "abs_energy_in_platform" // Dynamic energy and power DynEnergyInCore = "dyn_energy_in_core" DynEnergyInDRAM = "dyn_energy_in_dram" DynEnergyInUnCore = "dyn_energy_in_uncore" DynEnergyInPkg = "dyn_energy_in_pkg" DynEnergyInGPU = "dyn_energy_in_gpu" DynEnergyInOther = "dyn_energy_in_other" DynEnergyInPlatform = "dyn_energy_in_platform" // Idle energy and power IdleEnergyInCore = "idle_energy_in_core" IdleEnergyInDRAM = "idle_energy_in_dram" IdleEnergyInUnCore = "idle_energy_in_uncore" IdleEnergyInPkg = "idle_energy_in_pkg" IdleEnergyInGPU = "idle_energy_in_gpu" IdleEnergyInOther = "idle_energy_in_other" IdleEnergyInPlatform = "idle_energy_in_platform" // model_parameter_attributes EstimatorEnabledKey = "ESTIMATOR" LocalRegressorEnabledKey = "LOCAL_REGRESSOR" InitModelURLKey = "INIT_URL" FixedTrainerNameKey = "TRAINER" ModelFiltersKey = "FILTERS" DefaultTrainerName = "SGDRegressorTrainer" // MaxIRQ is the maximum number of IRQs to be monitored MaxIRQ = 10 DefaultMachineSpecFilePath = "/etc/kepler/models/machine/spec.json" )
Variables ¶
This section is empty.
Functions ¶
func APIServerEnabled ¶ added in v0.7.12
func APIServerEnabled() bool
func CPUArchOverride ¶
func CPUArchOverride() string
func ContainerComponentsPowerKey ¶ added in v0.5.4
func ContainerComponentsPowerKey() string
func ContainerPlatformPowerKey ¶ added in v0.5.4
func ContainerPlatformPowerKey() string
func CoreUsageMetric ¶
func CoreUsageMetric() string
func DCGMHostEngineEndpoint ¶ added in v0.7.4
func DCGMHostEngineEndpoint() string
func DRAMUsageMetric ¶
func DRAMUsageMetric() string
func EnabledEBPFCgroupID ¶
func EnabledEBPFCgroupID() bool
func EnabledGPU ¶
func EnabledGPU() bool
func ExposeHardwareCounterMetrics ¶
func ExposeHardwareCounterMetrics() bool
func ExposeIRQCounterMetrics ¶
func ExposeIRQCounterMetrics() bool
func GPUUsageMetric ¶ added in v0.7.12
func GPUUsageMetric() string
func GeneralUsageMetric ¶
func GeneralUsageMetric() string
func GetBPFSampleRate ¶ added in v0.7.12
func GetBPFSampleRate() int
func GetBindAddress ¶
func GetDefaultPowerModelURL ¶ added in v0.5.5
return local path to power model weight e.g., /var/lib/kepler/data/model_weight/acpi_AbsPowerModel.json
func GetLibvirtMetadataToken ¶ added in v0.7.12
func GetLibvirtMetadataToken() string
func GetLibvirtMetadataURI ¶ added in v0.7.12
func GetLibvirtMetadataURI() string
func GetMetricPath ¶
func GetMockACPIPowerPath ¶ added in v0.7.10
func GetMockACPIPowerPath() string
func GetModelConfigMap ¶ added in v0.5.4
func GetRedfishCredFilePath ¶ added in v0.5.2
func GetRedfishCredFilePath() string
func GetRedfishProbeIntervalInSeconds ¶ added in v0.5.2
func GetRedfishProbeIntervalInSeconds() int
func GetRedfishSkipSSLVerify ¶ added in v0.5.2
func GetRedfishSkipSSLVerify() bool
func InitModelConfigMap ¶
func InitModelConfigMap()
InitModelConfigMap initializes map of config from MODEL_CONFIG
func IsEnabledMSR ¶ added in v0.7.12
func IsEnabledMSR() bool
func IsExposeBPFMetricsEnabled ¶ added in v0.7.11
func IsExposeBPFMetricsEnabled() bool
IsExposeBPFMetricsEnabled returns false if BPF Metrics metrics are disabled to minimize overhead.
func IsExposeComponentPowerEnabled ¶ added in v0.7.11
func IsExposeComponentPowerEnabled() bool
IsExposeComponentPowerEnabled returns false if component power metrics are disabled to minimize overhead.
func IsExposeContainerStatsEnabled ¶ added in v0.7.3
func IsExposeContainerStatsEnabled() bool
IsExposeContainerStatsEnabled returns false if container metrics are disabled to minimize overhead in the Kepler standalone mode.
func IsExposeProcessStatsEnabled ¶ added in v0.7.3
func IsExposeProcessStatsEnabled() bool
IsExposeProcessStatsEnabled returns false if process metrics are disabled to minimize overhead in the Kepler standalone mode.
func IsExposeVMStatsEnabled ¶ added in v0.7.3
func IsExposeVMStatsEnabled() bool
IsExposeVMStatsEnabled returns false if VM metrics are disabled to minimize overhead.
func IsIdlePowerEnabled ¶ added in v0.6.1
func IsIdlePowerEnabled() bool
IsIdlePowerEnabled always return true if Kepler has access to system power metrics. However, if pre-trained power models are being used, Kepler should only expose metrics if the user is aware of the implications.
func IsModelServerEnabled ¶ added in v0.7.12
func IsModelServerEnabled() bool
func KubeConfig ¶ added in v0.5.1
func KubeConfig() string
func LogConfigs ¶
func LogConfigs()
func ModelConfigValues ¶ added in v0.5.4
func ModelServerEndpoint ¶
func ModelServerEndpoint() string
func NodeComponentsPowerKey ¶ added in v0.5.4
func NodeComponentsPowerKey() string
func NodePlatformPowerKey ¶ added in v0.5.4
func NodePlatformPowerKey() string
func ProcessComponentsPowerKey ¶ added in v0.5.4
func ProcessComponentsPowerKey() string
func ProcessPlatformPowerKey ¶ added in v0.5.4
func ProcessPlatformPowerKey() string
func SamplePeriodSec ¶ added in v0.5.1
func SamplePeriodSec() uint64
func SetConfig ¶ added in v0.7.12
func SetConfig(conf *Config)
SetConfig replaces the global instance
func SetEnableAPIServer ¶ added in v0.5.1
func SetEnableAPIServer(enabled bool)
SetEnableAPIServer enables Kepler to watch apiserver
func SetEnabledEBPFCgroupID ¶
func SetEnabledEBPFCgroupID(enabled bool)
SetEnabledEBPFCgroupID enables or disables eBPF code to collect cgroup ID based on kernel version and cgroup version. SetEnabledEBPFCgroupID enables the eBPF code to collect cgroup id if the system has kernel version > 4.18
func SetEnabledGPU ¶
func SetEnabledGPU(enabled bool)
SetEnabledGPU enables the exposure of gpu metrics
func SetEnabledHardwareCounterMetrics ¶
func SetEnabledHardwareCounterMetrics(enabled bool)
SetEnabledHardwareCounterMetrics enables the exposure of hardware counter metrics
func SetEnabledIdlePower ¶ added in v0.6.1
func SetEnabledIdlePower(enabled bool)
SetEnabledIdlePower allows enabling idle power exposure in Kepler's metrics. When direct power metrics access is available, idle power exposure is automatic. With pre-trained power models, awareness of implications is crucial. Estimated idle power is useful for bare-metal or single VM setups. In VM environments, accurately distributing idle power is tough due to unknown co-running VMs. Wrong division results in significant accuracy errors, duplicatiing the host idle power across all VMs. Container pre-trained models focus on dynamic power. Estimating idle power in limited information scenarios (like VMs) is complex. Idle power prediction is limited to bare-metal or single VM setups. Know the number of running VMs becomes crucial for achieving a fair distribution of idle power, particularly when following the GHG (Greenhouse Gas) protocol.
func SetEnabledMSR ¶ added in v0.7.12
func SetEnabledMSR(enabled bool)
SetEnabledMSR enables the exposure of MSR metrics
func SetEstimatorConfig ¶
func SetEstimatorConfig(modelName, selectFilter string)
func SetGPUUsageMetric ¶ added in v0.7.12
func SetGPUUsageMetric(metric string)
func SetMachineSpecFilePath ¶ added in v0.7.12
func SetMachineSpecFilePath(specFilePath string)
func SetModelServerEnable ¶ added in v0.7.12
func SetModelServerEnable(enabled bool)
func SetModelServerEndpoint ¶
func SetModelServerEndpoint(serverEndpoint string)
func SetRedfishCredFilePath ¶ added in v0.5.2
func SetRedfishCredFilePath(credFilePath string)
func SetRedfishProbeIntervalInSeconds ¶ added in v0.5.2
func SetRedfishProbeIntervalInSeconds(interval string)
func SetRedfishSkipSSLVerify ¶ added in v0.5.2
func SetRedfishSkipSSLVerify(skipSSLVerify bool)
Types ¶
type Config ¶ added in v0.7.12
type Config struct { ModelServerService string KernelVersion float32 Kepler KeplerConfig SamplePeriodSec uint64 Model ModelConfig Metrics MetricsConfig Redfish RedfishConfig Libvirt LibvirtConfig DCGMHostEngineEndpoint string }
type KeplerConfig ¶ added in v0.7.12
type KeplerConfig struct { KeplerNamespace string EnabledEBPFCgroupID bool EnabledGPU bool EnabledMSR bool EnableProcessStats bool ExposeContainerStats bool ExposeVMStats bool ExposeHardwareCounterMetrics bool ExposeIRQCounterMetrics bool ExposeBPFMetrics bool ExposeComponentPower bool ExposeIdlePowerMetrics bool EnableAPIServer bool MockACPIPowerPath string MaxLookupRetry int KubeConfig string BPFSampleRate int EstimatorModel string EstimatorSelectFilter string CPUArchOverride string MachineSpecFilePath string }
Configuration structs
type LibvirtConfig ¶ added in v0.7.12
type MachineSpec ¶ added in v0.7.12
type MachineSpec struct { Vendor string `json:"vendor"` Processor string `json:"processor"` Cores int `json:"cores"` Chips int `json:"chips"` Memory int `json:"memory"` Frequency int `json:"frequency"` ThreadsPerCore int `json:"threads_per_core"` }
MachineSpec defines a machine spec to submit for power model selection
func GenerateSpec ¶ added in v0.7.12
func GenerateSpec() *MachineSpec
func GetMachineSpec ¶ added in v0.7.12
func GetMachineSpec() *MachineSpec
GetMachineSpec initializes a map of MachineSpecValues from MACHINE_SPEC
type MetricsConfig ¶ added in v0.7.12
type ModelConfig ¶ added in v0.7.12
type ModelConfig struct { ModelServerEnable bool ModelServerEndpoint string ModelConfigValues map[string]string NodePlatformPowerKey string NodeComponentsPowerKey string ContainerPlatformPowerKey string ContainerComponentsPowerKey string ProcessPlatformPowerKey string ProcessComponentsPowerKey string }