Commit 7b787116 authored by Robert Dietrich's avatar Robert Dietrich

added batch size as parameter for the collectd startup and fixed lustre availability check

parent 9dc6b668
......@@ -22,19 +22,25 @@ sed -i -e "s+CUSTOM_TYPES_DIR+${CUSTOM_TYPES_DIR}+" ${PIKA_COLLECTD_CONF}
# set python module path
sed -i "/ModulePath/c \ \ ModulePath \"${COLLECTD_PYTHON_PLUGIN_PATH}\"" ${PIKA_COLLECTD_CONF}
# Check for lustre and, if available reset counters
LUSTRE_PATH=/proc/fs/lustre
if [ -d "${LUSTRE_PATH}" ]; then
if [ -x "$(command -v llstat)" ]; then
echo -e "\nLustre is available. Reset Lustre counters for " >> $DEBUG_PATH 2>&1
for fs in ${LUSTRE_PATH}/llite/*; do
echo -e "$fs " >> $DEBUG_PATH 2>&1
llstat -c $fs/stats
done
else
echo -e "\nLustre is available, but llstat is missing. Cannot reset Lustre counters. " >> $DEBUG_PATH 2>&1
# Check for Lustre paths and, if available, clean stats files
lustre_avail=false
for lustre_path in /proc/fs/lustre /sys/kernel/debug/lustre; do
if [ -d "${lustre_path}" ]; then
echo -e "\nLustre stats directory: ${lustre_path}" >> $DEBUG_PATH 2>&1
#if [ -x "$(command -v llstat)" ]; then
# echo -e "\nReset Clear stats file " >> $DEBUG_PATH 2>&1
# for fs in ${lustre_path}/llite/*; do
# echo -e "$fs " >> $DEBUG_PATH 2>&1
# #llstat -c $fs/stats
# done
#else
# echo -e "\nLustre is available, but llstat is missing. Cannot reset Lustre counters. " >> $DEBUG_PATH 2>&1
#fi
lustre_avail=true
fi
else
done
if [ "$lustre_avail" = false ]; then
echo -e "Disable Lustre plugin. ${LUSTRE_PATH} not found." >> $DEBUG_PATH 2>&1
sed -i "/Import \"lustre_bw\"/,/<\/Module>/"' s/^/#/' "${PIKA_COLLECTD_CONF}"
fi
......@@ -45,6 +51,7 @@ sed -i "/#INFLUXPORT/c \ \ \ \ port \"${INFLUXDB_PORT}\"" ${PIKA_COLLECTD_CONF}
sed -i "/#INFLUXUSER/c \ \ \ \ user \"${INFLUXDB_USER}\"" ${PIKA_COLLECTD_CONF}
sed -i "/#INFLUXPWD/c \ \ \ \ pwd \"${INFLUXDB_PASSWORD}\"" ${PIKA_COLLECTD_CONF}
sed -i "/#INFLUXDBNAME/c \ \ \ \ database \"${INFLUXDB_DATABASE}\"" ${PIKA_COLLECTD_CONF}
sed -i '/<Module influx_write>/,/Module>/'" s|batch_size.*|batch_size ${PIKA_COLLECTD_BATCH_SIZE}|" ${PIKA_COLLECTD_CONF}
which nvidia-smi >> $DEBUG_PATH 2>&1
......
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