root / plugins / condor / condor_ops_ @ 17f78427
Historique | Voir | Annoter | Télécharger (3,46 ko)
| 1 |
#!/bin/bash |
|---|---|
| 2 |
# |
| 3 |
# Wildard-plugin to monitor integer and floating point |
| 4 |
# performance capabilities of a Condor pool. |
| 5 |
# |
| 6 |
# Author: Šarūnas Burdulis, sarunas(a)mail.saabnet.com, 2008 |
| 7 |
# |
| 8 |
# Runs 'condor_status -server', |
| 9 |
# gets totals for MIPS and KFLOPS. |
| 10 |
# |
| 11 |
# Parameters understood: |
| 12 |
# |
| 13 |
# config (required) |
| 14 |
# autoconf (optional - used by munin-config) |
| 15 |
# suggest (optional - used by munin-config) |
| 16 |
# |
| 17 |
# Configurable variables: |
| 18 |
# |
| 19 |
# env.condor_status - Path to condor_status executable, |
| 20 |
# defaults to /usr/local/condor/bin/condor_status |
| 21 |
# env.constraint - Condor ClassAds constraint(s), as they are |
| 22 |
# specified on the condor_status command line. For example, |
| 23 |
# to monitor 64-bit Linux nodes only, set: |
| 24 |
# env.constraint 'arch=="x86_64" && opsys=="linux"' |
| 25 |
# |
| 26 |
# Magic markers - optional - used by installation scripts and |
| 27 |
# munin-config: |
| 28 |
# |
| 29 |
#%# family=contrib |
| 30 |
#%# capabilities=autoconf |
| 31 |
|
| 32 |
# optional tag |
| 33 |
TAG=`basename $0 | sed 's/^condor_ops_//g'` |
| 34 |
if [ -z "$TAG" ]; then |
| 35 |
GRAPHTITLE="MIPS, MFLOPS" |
| 36 |
else |
| 37 |
GRAPHTITLE="MIPS, MFLOPS (${TAG})"
|
| 38 |
fi |
| 39 |
|
| 40 |
# env.condor_status |
| 41 |
if [ ! -z "$condor_status" ]; then |
| 42 |
CS="$condor_status" |
| 43 |
else |
| 44 |
CS="/usr/local/condor/bin/condor_status" |
| 45 |
fi |
| 46 |
|
| 47 |
# env.constraint |
| 48 |
if [ ! -z "$constraint" ]; then |
| 49 |
CONS="-constraint ${constraint}"
|
| 50 |
else |
| 51 |
CONS= |
| 52 |
fi |
| 53 |
|
| 54 |
if [ "$1" = "autoconf" ]; then |
| 55 |
echo "no" |
| 56 |
exit 1 |
| 57 |
fi |
| 58 |
|
| 59 |
if [ "$1" = "suggest" ]; then |
| 60 |
echo "For example: condor_ops_Linux-x86_64." |
| 61 |
exit 0 |
| 62 |
fi |
| 63 |
|
| 64 |
if [ "$1" = "config" ]; then |
| 65 |
echo "graph_title "$GRAPHTITLE"" |
| 66 |
echo "graph_order mips_cur mips_max mflops_cur mflops_max" |
| 67 |
echo "graph_args --lower-limit 0 " |
| 68 |
echo 'graph_vlabel MIPS, MFLOPS' |
| 69 |
echo 'graph_scale no' |
| 70 |
echo 'graph_info Shows MIPS and MFLOPS from condor_status.' |
| 71 |
echo 'graph_category htc' |
| 72 |
echo 'graph_period second' |
| 73 |
echo 'mips_cur.label MIPS claimed' |
| 74 |
echo 'mips_cur.draw LINE2' |
| 75 |
echo 'mips_cur.min 0' |
| 76 |
echo 'mips_cur.max 200000' |
| 77 |
echo 'mips_cur.type GAUGE' |
| 78 |
echo "mips_cur.info Total (millions of integer operations)/s in Claimed nodes" |
| 79 |
echo 'mips_max.label MIPS max. possible' |
| 80 |
echo 'mips_max.draw LINE' |
| 81 |
echo 'mips_max.min 0' |
| 82 |
echo 'mips_max.max 200000' |
| 83 |
echo 'mips_max.type GAUGE' |
| 84 |
echo "mips_max.info Total capability in (millions of integer operations)/s" |
| 85 |
echo 'mflops_cur.label MFLOPS claimed' |
| 86 |
echo 'mflops_cur.draw LINE2' |
| 87 |
echo 'mflops_cur.min 0' |
| 88 |
echo 'mflops_cur.max 200000' |
| 89 |
echo 'mflops_cur.type GAUGE' |
| 90 |
echo "mflops_cur.info Total (millions of floating point operations)/s in Claimed nodes" |
| 91 |
echo 'mflops_max.label MFLOPS max. possible' |
| 92 |
echo 'mflops_max.draw LINE' |
| 93 |
echo 'mflops_max.min 0' |
| 94 |
echo 'mflops_max.max 200000' |
| 95 |
echo 'mflops_max.type GAUGE' |
| 96 |
echo "mflops_max.info Total capability in (millions of floating point operations)/s" |
| 97 |
exit 0 |
| 98 |
fi |
| 99 |
|
| 100 |
# max possible: |
| 101 |
#condor_status -cons 'arch=="x86_64" && opsys=="linux"' -totals -server |
| 102 |
# Machines Avail Memory Disk MIPS KFLOPS |
| 103 |
# Total 30 30 48960 257925730 104576 31092042 |
| 104 |
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}'
|
| 105 |
|
| 106 |
# currently using: |
| 107 |
#condor_status -cons 'arch=="x86_64" && opsys=="linux"' -totals -server -claimed |
| 108 |
# Machines MIPS KFLOPS AvgLoadAvg |
| 109 |
# Total 28 104576 29093286 0.960 |
| 110 |
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}'
|
