Commit Graph

730 Commits

Author SHA1 Message Date
Holger Obermaier
f3ffa29a37 Add Simultaneous Multithreading siblings 2023-09-08 11:07:37 +02:00
Holger Obermaier
7246278745 Correctly handle lists from /sys 2023-09-08 10:39:41 +02:00
Holger Obermaier
e5173bb9a2 Lookup all information from /sys/devices/system/cpu, /proc/cpuinfo is not portable 2023-09-08 10:09:04 +02:00
Holger Obermaier
fd56a14eb6 Lookup core ID from /sys/devices/system/cpu, /proc/cpuinfo is not portable 2023-09-08 09:25:03 +02:00
Holger Obermaier
35c20110ca Add comment 2023-09-07 14:08:03 +02:00
Holger Obermaier
a871753bdf Cleanup 2023-09-07 14:06:57 +02:00
Holger Obermaier
fbf178326a Add NumaDomainList and SMTList 2023-09-07 13:49:22 +02:00
Holger Obermaier
8fedef9024 Add DieList 2023-09-07 13:04:16 +02:00
Holger Obermaier
094f124a18 Avoid slice cloning. Directly use the cache 2023-09-07 11:45:38 +02:00
Holger Obermaier
1f5856c671 Reuse information from /proc/cpuinfo 2023-09-07 10:24:43 +02:00
Holger Obermaier
ae106566dd Use init function to initalize cache structure to avoid multi threading problems 2023-09-07 10:11:20 +02:00
Holger Obermaier
b3922b3255 Cleanup 2023-09-06 17:29:37 +02:00
Holger Obermaier
5fa53a7ab8 Cache CpuData 2023-09-06 16:46:30 +02:00
Holger Obermaier
3ac1ada204 Add caching 2023-09-06 16:19:16 +02:00
Holger Obermaier
2dc78ee0aa Avoid type conversion by using Atoi
Avoid copying structs by using pointer access
Increase readability with CamelCase variable names
2023-09-06 15:28:49 +02:00
Holger Obermaier
4b16ca4a30 Fix function getNumaDomain, it always returned 0 2023-09-06 11:35:45 +02:00
Holger Obermaier
6a2b74b0dc Use CamelCase 2023-09-06 10:44:23 +02:00
Holger Obermaier
3171792bd6 Use CamelCase 2023-09-06 10:37:57 +02:00
Holger Obermaier
99ccc04933 Read file line by line 2023-09-06 10:15:17 +02:00
Holger Obermaier
34436ac261 Read file line by line 2023-09-06 10:09:53 +02:00
Holger Obermaier
ae44b7f826 Read file line by line 2023-09-06 10:03:33 +02:00
Holger Obermaier
0cf32d5988 Switch to package slices from the golang 1.21 default library 2023-09-06 09:45:01 +02:00
Holger Obermaier
013aa9ec92 ioutil.ReadFile is deprecated: As of Go 1.16, this function simply calls os.ReadFile 2023-09-05 17:41:08 +02:00
Thomas Roehl
62720dec13 Fix path after installation to /usr/bin after installation 2023-08-31 15:12:43 +02:00
Thomas Roehl
c64943a954 Merge branch 'develop' of github.com:ClusterCockpit/cc-metric-collector into develop 2023-08-31 15:07:32 +02:00
Thomas Roehl
6eea1325bf Add safe.directory to Release action 2023-08-29 15:38:44 +02:00
Thomas Roehl
e205c16cdb Merge branch 'main' into develop 2023-08-29 14:14:59 +02:00
Thomas Gruber
195d0794b0
Merge develop branch into main (#106)
* Add cpu_used (all-cpu_idle) to CpustatCollector

* Update to line-protocol/v2

* Update runonce.yml with Golang 1.20

* Update fsnotify in LIKWID Collector

* Use not a pointer to line-protocol.Encoder

* Simplify Makefile

* Use only as many arguments as required

* Allow sum function to handle non float types

* Allow values to be a slice of type float64, float32, int, int64, int32, bool

* Use generic function to simplify code

* Add missing case for type []int32

* Use generic function to compute minimum

* Use generic function to compute maximum

* Use generic function to compute average

* Add error value to sumAnyType

* Use generic function to compute median

* For older versions of go slices is not part of the installation

* Remove old entries from go.sum

* Use simpler sort function

* Compute metrics ib_total and ib_total_pkts

* Add aggregated metrics.
Add missing units

* Update likwidMetric.go

Fixes a potential bug when `fsnotify.NewWatcher()` fails with an error

* Completly avoid memory allocations in infinibandMetric read()

* Fixed initialization: Initalization and measurements should run in the same thread

---------

Co-authored-by: Holger Obermaier <40787752+ho-ob@users.noreply.github.com>
2023-08-29 14:12:49 +02:00
Holger Obermaier
fa755ae401 Fixed initialization: Initalization and measurements should run in the same thread 2023-08-25 08:26:05 +02:00
Holger Obermaier
1b97953cdb Completly avoid memory allocations in infinibandMetric read() 2023-08-21 10:09:21 +02:00
Thomas Gruber
fc19b2b9a5
Update likwidMetric.go
Fixes a potential bug when `fsnotify.NewWatcher()` fails with an error
2023-08-18 11:27:47 +02:00
Holger Obermaier
e425b2c38e Add aggregated metrics.
Add missing units
2023-08-18 10:39:43 +02:00
Holger Obermaier
f5d2d27090 Compute metrics ib_total and ib_total_pkts 2023-08-17 16:46:53 +02:00
Holger Obermaier
41ea9139c6 Use simpler sort function 2023-08-17 15:13:31 +02:00
Holger Obermaier
da946472df Remove old entries from go.sum 2023-08-17 15:12:37 +02:00
Holger Obermaier
0ffbedb3ec For older versions of go slices is not part of the installation 2023-08-17 15:05:13 +02:00
Holger Obermaier
eafeea1a76 Use generic function to compute median 2023-08-17 14:46:22 +02:00
Holger Obermaier
fcda7a6921 Add error value to sumAnyType 2023-08-17 13:55:31 +02:00
Holger Obermaier
a25f4f8b8d Use generic function to compute average 2023-08-17 13:50:46 +02:00
Holger Obermaier
ceff67085b Use generic function to compute maximum 2023-08-17 11:46:15 +02:00
Holger Obermaier
ec86a83a27 Use generic function to compute minimum 2023-08-17 11:41:26 +02:00
Holger Obermaier
89c93185d4 Add missing case for type []int32 2023-08-17 11:24:06 +02:00
Holger Obermaier
c3004f8c6d Use generic function to simplify code 2023-08-17 10:20:47 +02:00
Holger Obermaier
a1c2c3856d Allow values to be a slice of type float64, float32, int, int64, int32, bool 2023-08-17 09:48:41 +02:00
Holger Obermaier
fa8dd5992d Allow sum function to handle non float types 2023-08-17 08:16:19 +02:00
Holger Obermaier
0b28c55162 Use only as many arguments as required 2023-08-17 08:03:33 +02:00
Holger Obermaier
fb480993ed Simplify Makefile 2023-08-16 15:40:33 +02:00
Thomas Röhl
ef49701f14 Use not a pointer to line-protocol.Encoder 2023-07-17 18:02:50 +02:00
Thomas Röhl
34bc23fbbd Update fsnotify in LIKWID Collector 2023-07-17 18:01:49 +02:00
Thomas Gruber
a7e8a1dfb5
Update runonce.yml with Golang 1.20 2023-07-17 15:23:21 +02:00