forked from pool/kepler
Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| cecec42cec | |||
| 45aed25cb9 |
@@ -1,9 +0,0 @@
|
||||
Index: kepler-0.7.11/pkg/bpf/gen.go
|
||||
===================================================================
|
||||
--- kepler-0.7.11.orig/pkg/bpf/gen.go
|
||||
+++ kepler-0.7.11/pkg/bpf/gen.go
|
||||
@@ -1,3 +1,3 @@
|
||||
package bpf
|
||||
|
||||
-//go:generate go run github.com/cilium/ebpf/cmd/bpf2go@v0.15.0 kepler ../../bpf/kepler.bpf.c -- -I../../bpf/include
|
||||
+//go:generate bpf2go kepler ../../bpf/kepler.bpf.c -- -I../../bpf/include
|
||||
@@ -1,29 +0,0 @@
|
||||
Index: kepler-0.7.11/pkg/collector/stats/utils.go
|
||||
===================================================================
|
||||
--- kepler-0.7.11.orig/pkg/collector/stats/utils.go
|
||||
+++ kepler-0.7.11/pkg/collector/stats/utils.go
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
- CPUModelDataPath = "/var/lib/kepler/data/cpus.yaml"
|
||||
+ CPUModelDataPath = "/usr/share/kepler/data/cpus.yaml"
|
||||
CPUPmuNamePath = "/sys/devices/cpu/caps/pmu_name"
|
||||
CPUTopologyPath = "/sys/devices/system/cpu/cpu%d/topology/physical_package_id"
|
||||
)
|
||||
Index: kepler-0.7.11/pkg/config/config.go
|
||||
===================================================================
|
||||
--- kepler-0.7.11.orig/pkg/config/config.go
|
||||
+++ kepler-0.7.11/pkg/config/config.go
|
||||
@@ -141,9 +141,9 @@ var (
|
||||
)
|
||||
|
||||
// return local path to power model weight
|
||||
-// e.g., /var/lib/kepler/data/acpi_AbsPowerModel.json
|
||||
+// e.g., /usr/share/kepler/data/model_weight/acpi_AbsPowerModel.json
|
||||
func GetDefaultPowerModelURL(modelOutputType, energySource string) string {
|
||||
- return fmt.Sprintf("/var/lib/kepler/data/%s_%sModel.json", energySource, modelOutputType)
|
||||
+ return fmt.Sprintf("/usr/share/kepler/data/model_weight/%s_%sModel.json", energySource, modelOutputType)
|
||||
}
|
||||
|
||||
func logBoolConfigs() {
|
||||
@@ -1,63 +0,0 @@
|
||||
diff --git a/go.mod b/go.mod
|
||||
index 2399a698..806ab848 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -18,7 +18,7 @@ require (
|
||||
github.com/prometheus/client_golang v1.19.1
|
||||
github.com/prometheus/prometheus v0.53.0
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
- golang.org/x/sys v0.22.0
|
||||
+ golang.org/x/sys v0.29.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
k8s.io/api v0.29.6
|
||||
k8s.io/apimachinery v0.29.6
|
||||
@@ -69,10 +69,10 @@ require (
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/stretchr/testify v1.9.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
|
||||
- golang.org/x/net v0.26.0 // indirect
|
||||
+ golang.org/x/net v0.34.0 // indirect
|
||||
golang.org/x/oauth2 v0.21.0 // indirect
|
||||
- golang.org/x/term v0.21.0 // indirect
|
||||
- golang.org/x/text v0.16.0 // indirect
|
||||
+ golang.org/x/term v0.28.0 // indirect
|
||||
+ golang.org/x/text v0.21.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/tools v0.22.0 // indirect
|
||||
google.golang.org/protobuf v1.34.1 // indirect
|
||||
diff --git a/go.sum b/go.sum
|
||||
index 0303e196..8764a739 100644
|
||||
--- a/go.sum
|
||||
+++ b/go.sum
|
||||
@@ -157,8 +157,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
-golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
|
||||
-golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
|
||||
+golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
|
||||
+golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
|
||||
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
|
||||
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -170,14 +170,14 @@ golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7w
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
-golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
|
||||
-golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
-golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
|
||||
-golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
|
||||
+golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
|
||||
+golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
+golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
|
||||
+golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
-golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
|
||||
-golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
|
||||
+golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
|
||||
+golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
5
_service
5
_service
@@ -4,9 +4,8 @@
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="revision">v0.7.11</param>
|
||||
<param name="revision">v0.11.3</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
</service>
|
||||
<service name="tar" mode="buildtime"/>
|
||||
<service name="recompress" mode="buildtime">
|
||||
@@ -17,7 +16,7 @@
|
||||
<param name="basename">kepler</param>
|
||||
</service>
|
||||
<service name="go_modules" mode="manual">
|
||||
<param name="archive">kepler-0.7.11.obscpio</param>
|
||||
<param name="archive">kepler-0.11.3.obscpio</param>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/sustainable-computing-io/kepler.git</param>
|
||||
<param name="changesrevision">4e92b14aa583e864afdd3e7dbe41789580e5130e</param></service></servicedata>
|
||||
<param name="changesrevision">e9c80364cf216fa66729ad8fef9709260f0818c4</param></service></servicedata>
|
||||
3
kepler-0.11.3.obscpio
Normal file
3
kepler-0.11.3.obscpio
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8ef80d76e6ceaf0fe71dc845f58874f4e7c886a6d9b79e155b370285b37171aa
|
||||
size 4467724
|
||||
BIN
kepler-0.7.11.obscpio
LFS
BIN
kepler-0.7.11.obscpio
LFS
Binary file not shown.
@@ -1,3 +1,79 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 30 11:38:55 UTC 2025 - Witek Bedyk <witold.bedyk@suse.com>
|
||||
|
||||
- Remove patches:
|
||||
* 0001-use-local-bpf2go.patch
|
||||
* 0002-change-data-path.patch
|
||||
* 0003-Bump-x-net.patch
|
||||
|
||||
- Update to version 0.11.3
|
||||
* Security: CVE-2025-58190 Fix excessive memory consumption by
|
||||
`html.ParseFragment` when processing specially crafted input
|
||||
(bsc#1251632)
|
||||
* Security: CVE-2025-47911 Fix various algorithms with quadratic
|
||||
complexity when parsing HTML documents (bsc#1251427)
|
||||
|
||||
- Update to version 0.11.2
|
||||
* Fix: Fix node power metrics for Virtual Machines.
|
||||
* Fix: Resolve an issue with pod energy metrics when a
|
||||
container has no usage.
|
||||
|
||||
- Update to version 0.11.1
|
||||
* Fix: Added missing serviceaccount in the Helm chart.
|
||||
|
||||
- Update to version 0.11.0
|
||||
* Feature: Added support for platform power metrics (AC).
|
||||
* Feature: Introduced experimental support for trained power
|
||||
models.
|
||||
* Fix: Improved the accuracy of power estimation for Virtual
|
||||
Machines.
|
||||
* Breaking Change: Metrics related to `kepler_vm_` have been
|
||||
refactored.
|
||||
|
||||
- Update to version 0.10.1
|
||||
* Feature: Added support for the ARM64 architecture.
|
||||
* Fix: Addressed issues when running on Virtual Machines
|
||||
without RAPL.
|
||||
* Fix: Includes several other bug fixes and stability
|
||||
improvements.
|
||||
|
||||
- Update to version 0.10.0
|
||||
* Breaking Change: This is a major rewrite with significant
|
||||
architectural changes.
|
||||
* Breaking Change: Legacy versions (0.9.0 and earlier) are
|
||||
now frozen, with no new features or bug fixes.
|
||||
* Breaking Change: The configuration format has been updated.
|
||||
* Breaking Change: The Kepler Model Server is not compatible
|
||||
with this version and above.
|
||||
* Feature: New modular architecture for better extensibility.
|
||||
* Feature: Enhanced performance and accuracy with dynamic
|
||||
detection of RAPL zones.
|
||||
* Feature: Reduced security requirements, no longer needing
|
||||
CAP_SYS_ADMIN or CAP_BPF capabilities.
|
||||
* Fix: Significantly reduced resource usage.
|
||||
|
||||
- Update to version 0.9.0
|
||||
* Note: This is the final legacy release.
|
||||
* Feature: Added support for GPU power monitoring.
|
||||
* Feature: Introduced a model server for training power models.
|
||||
|
||||
- Update to version 0.8.2
|
||||
* Fix: Addressed a bug in RAPL power calculation on
|
||||
multi-socket systems.
|
||||
|
||||
- Update to version 0.8.1
|
||||
* Fix: This version includes multiple bug fixes and
|
||||
stability improvements.
|
||||
|
||||
- Update to version 0.8.0
|
||||
* Feature: Introduced a new estimator framework.
|
||||
* Breaking Change: The API is backward incompatible with
|
||||
previous versions.
|
||||
|
||||
- Update to version 0.7.12
|
||||
* Fix: This version includes multiple bug fixes and
|
||||
stability improvements.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 10 10:52:10 UTC 2025 - Witek Bedyk <witold.bedyk@suse.com>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: kepler
|
||||
version: 0.7.11
|
||||
mtime: 1720623083
|
||||
commit: bf1f62d8c580aa742d4ae90dedaff70044be9b78
|
||||
version: 0.11.3
|
||||
mtime: 1763740537
|
||||
commit: e9c80364cf216fa66729ad8fef9709260f0818c4
|
||||
|
||||
15
kepler.service
Normal file
15
kepler.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Kepler
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/usr/bin/
|
||||
ExecStart=kepler
|
||||
Restart=always
|
||||
User=root
|
||||
CPUAccounting=yes
|
||||
BlockIOAccounting=yes
|
||||
MemoryAccounting=yes
|
||||
LimitNOFILE=1048576
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
45
kepler.spec
45
kepler.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package kepler
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: kepler
|
||||
Version: 0.7.11
|
||||
Version: 0.11.3
|
||||
Release: 0
|
||||
Summary: Kubernetes-based Efficient Power Level Exporter
|
||||
License: Apache-2.0 AND (BSD-2-Clause OR GPL-2.0-only) AND GPL-2.0-only
|
||||
@@ -25,16 +25,13 @@ Group: System/Monitoring
|
||||
URL: https://github.com/sustainable-computing-io/kepler/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: vendor.tar.gz
|
||||
Patch1: 0001-use-local-bpf2go.patch
|
||||
Patch2: 0002-change-data-path.patch
|
||||
Patch3: 0003-Bump-x-net.patch
|
||||
Source2: kepler.service
|
||||
|
||||
BuildRequires: bpf2go
|
||||
BuildRequires: clang
|
||||
BuildRequires: llvm
|
||||
BuildRequires: llvm-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: golang(API) >= 1.21
|
||||
BuildRequires: golang(API) >= 1.24
|
||||
Recommends: cpuid
|
||||
%{?systemd_ordering}
|
||||
|
||||
@@ -42,29 +39,20 @@ Recommends: cpuid
|
||||
Kubernetes-based Efficient Power Level Exporter
|
||||
|
||||
%prep
|
||||
%autosetup -a1 -p1 -n kepler-%{version}
|
||||
%setup -a1 -n kepler-%{version}
|
||||
|
||||
%build
|
||||
%ifnarch ppc64
|
||||
export GOFLAGS="-buildmode=pie"
|
||||
%endif
|
||||
go generate ./pkg/bpf
|
||||
go build -o %{name} ./cmd/exporter/exporter.go
|
||||
echo -n "true" > ./ENABLE_PROCESS_METRICS
|
||||
go build -o %{name} ./cmd/kepler
|
||||
|
||||
%install
|
||||
install -d %{buildroot}%{_sysconfdir}/%{name}
|
||||
install -d %{buildroot}%{_datadir}/%{name}/data
|
||||
install -d %{buildroot}%{_sysconfdir}/%{name}/%{name}.config
|
||||
|
||||
install -D -m755 ./%{name} %{buildroot}%{_bindir}/%{name}
|
||||
install -D -m644 ./packaging/rpm/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
|
||||
install -D -m644 ./ENABLE_PROCESS_METRICS %{buildroot}%{_sysconfdir}/%{name}/%{name}.config/ENABLE_PROCESS_METRICS
|
||||
install -D -m644 ./data/cpus.yaml %{buildroot}%{_datadir}/%{name}/data/cpus.yaml
|
||||
install -D -m644 ./data/model_weight/acpi_AbsPowerModel.json %{buildroot}%{_datadir}/%{name}/data/model_weight/acpi_AbsPowerModel.json
|
||||
install -D -m644 ./data/model_weight/acpi_DynPowerModel.json %{buildroot}%{_datadir}/%{name}/data/model_weight/acpi_DynPowerModel.json
|
||||
install -D -m644 ./data/model_weight/intel_rapl_AbsPowerModel.json %{buildroot}%{_datadir}/%{name}/data/model_weight/intel_rapl_AbsPowerModel.json
|
||||
install -D -m644 ./data/model_weight/intel_rapl_DynPowerModel.json %{buildroot}%{_datadir}/%{name}/data/model_weight/intel_rapl_DynPowerModel.json
|
||||
install -D -m644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
|
||||
install -m644 ./hack/config.yaml %{buildroot}%{_sysconfdir}/%{name}/config.yaml
|
||||
|
||||
%pre
|
||||
%service_add_pre %{name}.service
|
||||
@@ -79,21 +67,12 @@ install -D -m644 ./data/model_weight/intel_rapl_DynPowerModel.json %{buildroot}%
|
||||
%service_del_postun %{name}.service
|
||||
|
||||
%files
|
||||
%license LICENSE-APACHE
|
||||
%license LICENSE-BSD2
|
||||
%license LICENSE-GPL2
|
||||
%license LICENSES/Apache-2.0.txt
|
||||
%license LICENSES/BSD-2-Clause.txt
|
||||
%license LICENSES/GPL-2.0-only.txt
|
||||
%dir /%{_sysconfdir}/%{name}
|
||||
%dir /%{_sysconfdir}/%{name}/%{name}.config
|
||||
%dir %{_datadir}/%{name}
|
||||
%dir %{_datadir}/%{name}/data
|
||||
%dir %{_datadir}/%{name}/data/model_weight
|
||||
%config(noreplace) /%{_sysconfdir}/%{name}/config.yaml
|
||||
%{_bindir}/%{name}
|
||||
%{_unitdir}/%{name}.service
|
||||
%config /%{_sysconfdir}/%{name}/%{name}.config/ENABLE_PROCESS_METRICS
|
||||
%{_datadir}/kepler/data/cpus.yaml
|
||||
%{_datadir}/kepler/data/model_weight/acpi_AbsPowerModel.json
|
||||
%{_datadir}/kepler/data/model_weight/acpi_DynPowerModel.json
|
||||
%{_datadir}/kepler/data/model_weight/intel_rapl_AbsPowerModel.json
|
||||
%{_datadir}/kepler/data/model_weight/intel_rapl_DynPowerModel.json
|
||||
|
||||
%changelog
|
||||
|
||||
BIN
vendor.tar.gz
LFS
BIN
vendor.tar.gz
LFS
Binary file not shown.
Reference in New Issue
Block a user