2008-04-09 18:50:22 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Wildard-plugin to monitor integer and floating point
|
|
|
|
# performance capabilities of a Condor pool.
|
|
|
|
#
|
|
|
|
# Author: Šarūnas Burdulis, sarunas(a)mail.saabnet.com, 2008
|
|
|
|
#
|
2018-08-02 02:03:42 +02:00
|
|
|
# Runs 'condor_status -server',
|
2008-04-09 18:50:22 +02:00
|
|
|
# gets totals for MIPS and KFLOPS.
|
|
|
|
#
|
|
|
|
# Parameters understood:
|
|
|
|
#
|
|
|
|
# config (required)
|
|
|
|
# autoconf (optional - used by munin-config)
|
|
|
|
# suggest (optional - used by munin-config)
|
|
|
|
#
|
|
|
|
# Configurable variables:
|
|
|
|
#
|
|
|
|
# env.condor_status - Path to condor_status executable,
|
|
|
|
# defaults to /usr/local/condor/bin/condor_status
|
|
|
|
# env.constraint - Condor ClassAds constraint(s), as they are
|
2018-08-02 02:03:42 +02:00
|
|
|
# specified on the condor_status command line. For example,
|
2008-04-09 18:50:22 +02:00
|
|
|
# to monitor 64-bit Linux nodes only, set:
|
|
|
|
# env.constraint 'arch=="x86_64" && opsys=="linux"'
|
|
|
|
#
|
|
|
|
# Magic markers - optional - used by installation scripts and
|
|
|
|
# munin-config:
|
|
|
|
#
|
|
|
|
#%# family=contrib
|
|
|
|
#%# capabilities=autoconf
|
|
|
|
|
|
|
|
# optional tag
|
|
|
|
TAG=`basename $0 | sed 's/^condor_ops_//g'`
|
|
|
|
if [ -z "$TAG" ]; then
|
|
|
|
GRAPHTITLE="MIPS, MFLOPS"
|
|
|
|
else
|
|
|
|
GRAPHTITLE="MIPS, MFLOPS (${TAG})"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# env.condor_status
|
|
|
|
if [ ! -z "$condor_status" ]; then
|
|
|
|
CS="$condor_status"
|
|
|
|
else
|
|
|
|
CS="/usr/local/condor/bin/condor_status"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# env.constraint
|
|
|
|
if [ ! -z "$constraint" ]; then
|
|
|
|
CONS="-constraint ${constraint}"
|
|
|
|
else
|
|
|
|
CONS=
|
|
|
|
fi
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2008-04-09 18:50:22 +02:00
|
|
|
if [ "$1" = "autoconf" ]; then
|
|
|
|
echo "no"
|
2018-09-16 04:01:57 +02:00
|
|
|
exit 0
|
2008-04-09 18:50:22 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" = "suggest" ]; then
|
|
|
|
echo "For example: condor_ops_Linux-x86_64."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" = "config" ]; then
|
|
|
|
echo "graph_title "$GRAPHTITLE""
|
|
|
|
echo "graph_order mips_cur mips_max mflops_cur mflops_max"
|
|
|
|
echo "graph_args --lower-limit 0 "
|
|
|
|
echo 'graph_vlabel MIPS, MFLOPS'
|
|
|
|
echo 'graph_scale no'
|
|
|
|
echo 'graph_info Shows MIPS and MFLOPS from condor_status.'
|
2017-02-22 04:04:04 +01:00
|
|
|
echo 'graph_category htc'
|
2008-04-09 18:50:22 +02:00
|
|
|
echo 'graph_period second'
|
|
|
|
echo 'mips_cur.label MIPS claimed'
|
|
|
|
echo 'mips_cur.draw LINE2'
|
|
|
|
echo 'mips_cur.min 0'
|
|
|
|
echo 'mips_cur.max 200000'
|
|
|
|
echo 'mips_cur.type GAUGE'
|
2018-08-02 02:03:42 +02:00
|
|
|
echo "mips_cur.info Total (millions of integer operations)/s in Claimed nodes"
|
2008-04-09 18:50:22 +02:00
|
|
|
echo 'mips_max.label MIPS max. possible'
|
|
|
|
echo 'mips_max.draw LINE'
|
|
|
|
echo 'mips_max.min 0'
|
|
|
|
echo 'mips_max.max 200000'
|
|
|
|
echo 'mips_max.type GAUGE'
|
2018-08-02 02:03:42 +02:00
|
|
|
echo "mips_max.info Total capability in (millions of integer operations)/s"
|
2008-04-09 18:50:22 +02:00
|
|
|
echo 'mflops_cur.label MFLOPS claimed'
|
|
|
|
echo 'mflops_cur.draw LINE2'
|
|
|
|
echo 'mflops_cur.min 0'
|
|
|
|
echo 'mflops_cur.max 200000'
|
|
|
|
echo 'mflops_cur.type GAUGE'
|
2018-08-02 02:03:42 +02:00
|
|
|
echo "mflops_cur.info Total (millions of floating point operations)/s in Claimed nodes"
|
2008-04-09 18:50:22 +02:00
|
|
|
echo 'mflops_max.label MFLOPS max. possible'
|
|
|
|
echo 'mflops_max.draw LINE'
|
|
|
|
echo 'mflops_max.min 0'
|
|
|
|
echo 'mflops_max.max 200000'
|
|
|
|
echo 'mflops_max.type GAUGE'
|
2018-08-02 02:03:42 +02:00
|
|
|
echo "mflops_max.info Total capability in (millions of floating point operations)/s"
|
2008-04-09 18:50:22 +02:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# max possible:
|
2018-08-02 02:03:42 +02:00
|
|
|
#condor_status -cons 'arch=="x86_64" && opsys=="linux"' -totals -server
|
2008-04-09 18:50:22 +02:00
|
|
|
# Machines Avail Memory Disk MIPS KFLOPS
|
|
|
|
# Total 30 30 48960 257925730 104576 31092042
|
|
|
|
eval $CS $CONS -totals -server | awk 'BEGIN { mipsc=0; mflopsc=0 } /Total/ {mips = $6; kflops = $7; mflops = int(kflops/1000) } END {print "mips_max.value " mips "\nmflops_max.value " mflops}'
|
|
|
|
|
|
|
|
# currently using:
|
|
|
|
#condor_status -cons 'arch=="x86_64" && opsys=="linux"' -totals -server -claimed
|
|
|
|
# Machines MIPS KFLOPS AvgLoadAvg
|
|
|
|
# Total 28 104576 29093286 0.960
|
|
|
|
eval $CS $CONS -totals -server -claimed | awk 'BEGIN { mipsc=0; mflopsc=0 } /Total/ { mipsc = $3; kflopsc = $4; mflopsc = int(kflopsc/1000) } END {print "mips_cur.value " mipsc "\nmflops_cur.value " mflopsc}'
|