pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/sysutils/node_exporter
Module Name: pkgsrc
Committed By: tnn
Date: Mon Aug 5 00:55:21 UTC 2024
Modified Files:
pkgsrc/sysutils/node_exporter: Makefile distinfo
pkgsrc/sysutils/node_exporter/patches: patch-collector_cpu__netbsd.go
Log Message:
node_exporter: cpu_netbsd: fix integer sizes of hw.ncpu and kern.cp_time
To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 pkgsrc/sysutils/node_exporter/Makefile
cvs rdiff -u -r1.15 -r1.16 pkgsrc/sysutils/node_exporter/distinfo
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/sysutils/node_exporter/patches/patch-collector_cpu__netbsd.go
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/sysutils/node_exporter/Makefile
diff -u pkgsrc/sysutils/node_exporter/Makefile:1.70 pkgsrc/sysutils/node_exporter/Makefile:1.71
--- pkgsrc/sysutils/node_exporter/Makefile:1.70 Sun Aug 4 12:27:41 2024
+++ pkgsrc/sysutils/node_exporter/Makefile Mon Aug 5 00:55:21 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.70 2024/08/04 12:27:41 tnn Exp $
+# $NetBSD: Makefile,v 1.71 2024/08/05 00:55:21 tnn Exp $
DISTNAME= node_exporter-1.8.2
-PKGREVISION= 3
+PKGREVISION= 4
MASTER_SITES= ${MASTER_SITE_GITHUB:=prometheus/}
CATEGORIES= sysutils
GITHUB_TAG= v${PKGVERSION_NOREV}
Index: pkgsrc/sysutils/node_exporter/distinfo
diff -u pkgsrc/sysutils/node_exporter/distinfo:1.15 pkgsrc/sysutils/node_exporter/distinfo:1.16
--- pkgsrc/sysutils/node_exporter/distinfo:1.15 Sun Aug 4 13:09:15 2024
+++ pkgsrc/sysutils/node_exporter/distinfo Mon Aug 5 00:55:21 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2024/08/04 13:09:15 tnn Exp $
+$NetBSD: distinfo,v 1.16 2024/08/05 00:55:21 tnn Exp $
BLAKE2s (github.com_alecthomas_kingpin_v2_@v_v2.4.0.mod) = 20c554bf73adc1d4faea9cf1eba7f569d362037f364d643d7176e790eed60759
SHA512 (github.com_alecthomas_kingpin_v2_@v_v2.4.0.mod) = 27b647208aec705c995e523035f278c6b81102ba59f5a95e6e7adf1e8cba2e166d73f0d1115946acfcb736918b5b0db66d2f2aeba084a3581a7a29d342f511b2
@@ -387,7 +387,7 @@ Size (howett.net_plist_@v_v1.0.1.zip) =
BLAKE2s (node_exporter-1.8.2.tar.gz) = 2370bedb44e5469e3f9971b1c7e493adf4995107d748a8853e7549750e53548f
SHA512 (node_exporter-1.8.2.tar.gz) = 68112a85a9ffde88d75893c30ab992ae3c591d44fbefa10e45cf94d228c8f8c44bb3585707521e355817c4b4276cf77eeaf4ed9d0261de02620135ad12f5e711
Size (node_exporter-1.8.2.tar.gz) = 335292 bytes
-SHA1 (patch-collector_cpu__netbsd.go) = 4c520fad4cb583fbad4e0ad427164c436a9f49be
+SHA1 (patch-collector_cpu__netbsd.go) = 571c8eb18d53648539bfcbf30f3702250b301de3
SHA1 (patch-collector_filesystem__common.go) = 5340a9b36478efa1563c7359469840a7bb652343
SHA1 (patch-collector_filesystem__netbsd.go) = 446190ceca0c37bada8ed444ce497c2e9b8e05ae
SHA1 (patch-collector_netdev__common.go) = 83b6615334490e8ccfd8c311b36ee2ec98c0ad15
Index: pkgsrc/sysutils/node_exporter/patches/patch-collector_cpu__netbsd.go
diff -u pkgsrc/sysutils/node_exporter/patches/patch-collector_cpu__netbsd.go:1.2 pkgsrc/sysutils/node_exporter/patches/patch-collector_cpu__netbsd.go:1.3
--- pkgsrc/sysutils/node_exporter/patches/patch-collector_cpu__netbsd.go:1.2 Sun Aug 4 13:09:15 2024
+++ pkgsrc/sysutils/node_exporter/patches/patch-collector_cpu__netbsd.go Mon Aug 5 00:55:21 2024
@@ -1,4 +1,4 @@
-$NetBSD: patch-collector_cpu__netbsd.go,v 1.2 2024/08/04 13:09:15 tnn Exp $
+$NetBSD: patch-collector_cpu__netbsd.go,v 1.3 2024/08/05 00:55:21 tnn Exp $
collector/cpu_netbsd: fix 32-bit host support and plug memory leak
https://github.com/prometheus/node_exporter/pull/3083
@@ -84,3 +84,26 @@ https://github.com/prometheus/node_expor
var props sysmonProperties
if _, err = plist.Unmarshal(bytes, &props); err != nil {
+@@ -180,7 +183,7 @@ func getCPUTimes() ([]cputime, error) {
+ if err != nil {
+ return nil, err
+ }
+- ncpus := *(*int)(unsafe.Pointer(&ncpusb[0]))
++ ncpus := int(*(*uint32)(unsafe.Pointer(&ncpusb[0])))
+
+ if ncpus < 1 {
+ return nil, errors.New("Invalid cpu number")
+@@ -192,10 +195,10 @@ func getCPUTimes() ([]cputime, error) {
+ if err != nil {
+ return nil, err
+ }
+- for len(cpb) >= int(unsafe.Sizeof(int(0))) {
+- t := *(*int)(unsafe.Pointer(&cpb[0]))
++ for len(cpb) >= int(unsafe.Sizeof(uint64(0))) {
++ t := *(*uint64)(unsafe.Pointer(&cpb[0]))
+ times = append(times, float64(t)/cpufreq)
+- cpb = cpb[unsafe.Sizeof(int(0)):]
++ cpb = cpb[unsafe.Sizeof(uint64(0)):]
+ }
+ }
+
Home |
Main Index |
Thread Index |
Old Index