User Tools

Site Tools


cluster:158

This is an old revision of the document!



Back

Openlava Elim

Pulling some information together for Openlava users documenting the ability to write your own monitor resources which the scheduler will then manage. This is handy so jobs go in PENDing mode while waiting for custom resoures to become available instead of crashing immeditaley upon submission.

  • Old example reporting local and network based scratch space availability.
    • Written because does file locking poorly, hence /localscratch, does not have to be large.
    • What is an eLIM?
  • Example of managing licenses.
    • “James Davis wrote: Here is my full updated elim that works with polling a FLEXLM license server with lmutil lmstat :) Hope this helps someone out there”
#~/bin/bash

#Author:  James Davis

#Updated:  Dec 9, 2015

#declare the features we want to search for

declare -a features=(

    'svverification'

    'mtiverification'

    'msimhdlsim'

    'msimhdlmix'

  )

#endless loop that will echo out the line openlava is waiting for every 60 seconds

while true

  do

#counts how many features are in the array above and puts it as the first entry in the output

output="${#features[@]} "

    for i in ${features[@]}; do

      #line will equal the line that is in the format Users of FEATURE: (Total of XX licenses issued; Total of XX licenses in use)

      line=`/apps/flexnet-11.12/lmutil lmstat -c 1700@licensing -f $i | sed -n "/^Users of $i/p"`i

      #issued is the 1st numbers found

      issued=`echo $line  | sed -r 's/([^0-9]*([0-9]*)){1}.*/\2/'`

      #used is the 2nd numbers found

      used=`echo $line |  sed -r 's/([^0-9]*([0-9]*)){2}.*/\2/'`

      #subtract total and in use to get how many licenses are available

      available=$((issued-used))

      #concatenate the string for output

      output+="$i $available "

     done

     echo "$output"

     sleep 60

  done
  


Back

cluster/158.1490793246.txt.gz · Last modified: 2017/03/29 09:14 by hmeij07