From 6b10797556c16b3874ce8097b4d8525b8adf84cf Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Fri, 19 Dec 2025 17:32:01 +0100 Subject: [PATCH] Update README and build docu --- README.md | 21 +++++++++++++-------- docs/building.md | 11 ++++++++++- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4bb04c2..85aa6a7 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,14 @@ There is a main configuration file with basic settings that point to the other c ``` json { - "sinks": "sinks.json", - "collectors" : "collectors.json", - "receivers" : "receivers.json", - "router" : "router.json", - "interval": "10s", - "duration": "1s" + "sinks-file": "sinks.json", + "collectors-file" : "collectors.json", + "receivers-file" : "receivers.json", + "router-file" : "router.json", + "main": { + "interval": "10s", + "duration": "1s" + } } ``` @@ -52,11 +54,14 @@ See the component READMEs for their configuration: # Installation +Dependecies: +- golang +- hwloc + ``` $ git clone git@github.com:ClusterCockpit/cc-metric-collector.git +$ export CGO_LDFLAGS="-L/path/to/hwloc/lib/dir" $ make (downloads LIKWID, builds it as static library with 'direct' accessmode and copies all required files for the collector) -$ go get (requires at least golang 1.16) -$ make ``` For more information, see [here](./docs/building.md). diff --git a/docs/building.md b/docs/building.md index 53a5fb0..fe0e59c 100644 --- a/docs/building.md +++ b/docs/building.md @@ -1,6 +1,15 @@ # Building the cc-metric-collector -In most cases, a simple `make` in the main folder is enough to get a `cc-metric-collector` binary. It is basically a `go build` but some collectors require additional tasks. There is currently no Golang interface to LIKWID, so it uses `cgo` to create bindings but `cgo` requires the LIKWID header files. Therefore, it checks whether LIKWID is installed and if not it downloads LIKWID and copies the headers. +Dependencies: +- golang +- hwloc + +``` +$ export CGO_LDFLAGS="-L/path/to/hwloc/lib/dir" +$ make +``` + +In most cases, a simple `make` in the main folder is enough to get a `cc-metric-collector` binary as long as hwloc is in default locations. It is basically a `go build` but some collectors require additional tasks. There is currently no Golang interface to LIKWID, so it uses `cgo` to create bindings but `cgo` requires the LIKWID header files. Therefore, it checks whether LIKWID is installed and if not it downloads LIKWID and copies the headers. ## System integration