Commit 782d9bcc authored by Robert Dietrich's avatar Robert Dietrich

fixed bug in modifying the collectd conf file (if no likwid groups could be found)

parent a39c8d78
......@@ -73,11 +73,11 @@ group_count=`ls -l $LIKWID_INST_PATH/share/likwid/perfgroups/$arch_dir | grep -c
if [ "$group_count" -gt 0 ]; then
# assuming that not more than 5 groups are measured
if [ "$group_count" -eq 1 ]; then
mtime=50
mtime=58
elif [ "$group_count" -eq 2 ]; then
mtime=25
mtime=29
elif [ "$group_count" -eq 3 ]; then
mtime=15
mtime=19
else
mtime=10
fi
......@@ -97,9 +97,14 @@ if [ "$group_count" -gt 0 ]; then
# set the socket file from PIKA configuration
sed -i '/<Plugin unixsock>/,/Plugin>/'" s|SocketFile.*|SocketFile \"${PIKA_COLLECTD_SOCKET}\"|" ${PIKA_COLLECTD_CONF}
# FIX for moving from PIKA 1.0 to 1.1 (PerCore option is not known in 1.0)
if [ $PIKA_VERSION = "1.0" ]; then
sed -i '/<Plugin likwid>/,/Plugin>/'" s|PerCore.*|#&|" ${PIKA_COLLECTD_CONF}
fi
else
echo -e "Error: No PIKA group definitions for LIKWID found! Disable LIKWID and unixsock plugins." >> $DEBUG_PATH 2>&1
sed -i "/likwid/,/likwid_end/"' s/^/#/' "${PIKA_COLLECTD_CONF}"
sed -i "/LoadPlugin likwid/,/Plugin>/"' s/^/#/' "${PIKA_COLLECTD_CONF}"
sed -i "/LoadPlugin unixsock/,/Plugin>/"' s/^/#/' "${PIKA_COLLECTD_CONF}"
fi
......@@ -114,6 +119,9 @@ export HOME="workaroundLIKWIDbug"
echo -e "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $DEBUG_PATH 2>&1
# add Likwid bin path to PATH (required by InfluxDB write plugin, which calls likwid-topology)
export PATH=${LIKWID_INST_PATH}/bin:${PATH}
$DAEMON >> $DEBUG_PATH 2>&1
# check if collectd is up and running
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment