0
0
mirror of https://github.com/netdata/netdata.git synced 2025-01-03 08:58:39 +00:00
netdata_netdata/packaging/cmake/Modules/FindLibSensors.cmake
Costa Tsaousis db020a1f47
Monitor sensors using libsensors via debugfs.plugin (#19251)
* add libsensors to debugfs.plugin

* add string representations of libsensors types

* read sensors3.conf during initialization

* more work

* progress

* working set

* working set 2

* working sensors

* Vendor lm-sensors as a Git submodule

* vendored libsensors

* search for sensors headers in the vendored library

* add flex and bison to required packages

* include sensors.h from the vendored directory

* remove HAVE_LIBSENSORS variable

* do not load sensor subfeatures that are not needed

* added device, driver and subsystem labels

* add message id to log

* copy the default sensors3.conf file to netdata stock configs directory

* move sensors to a separate thread; automatically adapt data collection frequency to match actual data collection latency

* make debugfs plugin wait while libsensors is running

* fix for update every

* update chart ctx and id, remove non-important labels

* dont set label to feat name if none

* just alarm

* add sybsystem and driver labels

---------

Co-authored-by: ilyam8 <ilya@netdata.cloud>
2024-12-29 19:37:42 +02:00

24 lines
678 B
CMake

# FindLibSensors.cmake
# Locate libsensors library and headers
# Locate the libsensors header file
find_path(LibSensors_INCLUDE_DIRS
NAMES sensors/sensors.h
PATHS /usr/include /usr/local/include
)
# Locate the libsensors library
find_library(LibSensors_LIBRARIES
NAMES sensors
PATHS /usr/lib /usr/local/lib
)
# Check if both the library and header were found
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibSensors
REQUIRED_VARS LibSensors_LIBRARIES LibSensors_INCLUDE_DIRS
)
# Mark the variables as advanced (not shown in the GUI by default)
mark_as_advanced(LibSensors_LIBRARIES LibSensors_INCLUDE_DIRS)