-
Notifications
You must be signed in to change notification settings - Fork 0
4.5.3 Sensor Plugin Build Install
Considering the dynamic architecture of the udsensors
plugins, it only has one dependency with the SenSys plugins library, which contains the symbols of the dataContainer
class. Plugins can be installed in any location, and the path should be passed to the monitoring system by means of an MCA variable.
Assuming the monitoring system is installed in /opt/sensys
, and using GNU g++
compiler, the following compilation command can be used:
g++ -O3 -fPIC -I/opt/sensys/include/openmpi/ -L/opt/sensys/lib/ -shared -rdynamic -lsensysplugins mysensor.cpp -o testplugin.so
The following Makefile
example can be customized for convenience:
SENSORPLUGIN=myplugin
PLUGINPREFIX=libudplugins_
CXX=g++
SENSYSPATH=/opt/sensys
CXXFLAGS=-O3 -fPIC -I$(SENSYSPATH)/include/openmpi
LDFLAGS=-L$(SENSYSPATH)/lib -shared -rdynamic -lsensysplugins
all:
$(CXX) $(CXXFLAGS) $(LDFLAGS) mysensor.cpp -o $(PLUGINPREFIX)$(SENSORPLUGIN).so
clean:
-rm *.o
-rm *.so
All of the user defined sensor plugins are being handled by a SenSys sensor plugin named udsensors
. The sampling would be performed at the specified sample rate for that plugin, serially requesting the samples to each of the registered plugins.
The following MCA parameters are supported for udsensors
:
-
use_progress_thread
: Use a dedicated progress thread forudsensors
sensors [default: false]. This is a thread for the wholeudsensors
handler, not for each of the user defined plugins. -
sample_rate
: Sample rate in seconds. As with every other sensor plugin, this sample rate is applicable if the handler is running on its own thread. If not, it will sample at the base sample rate. -
collect_metrics
: Enable metric collection for the udsensors plugin. -
path
: User-defined sensors path. By default, sensors would be searched in the installation path, within thelib/openmpi
directory.
Assuming that user defined plugins and headers are located in the default path, the simplest way to start the daemon for sampling udsensors
is:
sudo ./orcmd --omca sensor heartbeat,udsensors