User Tools

Site Tools


cluster:158

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
cluster:158 [2017/03/29 09:08]
hmeij07 created
cluster:158 [2017/03/29 09:18] (current)
hmeij07
Line 7: Line 7:
  
   * Old example reporting local and network based scratch space availability.   * Old example reporting local and network based scratch space availability.
-    * Written because does file locking poorly, hence /​localscratch,​ does not have to be large. +    * Written because ​NFS does file locking poorly, hence /​localscratch,​ does not have to be large. 
-    * [[cluster:​49|eLIM]]+    * What the heck is an [[cluster:​49|eLIM]]
 + 
 +  * Newer example showing the integration of GPU availability into Openlava using eLim. 
 +    * [[cluster:​119|Submitting GPU Jobs]] 
 + 
 +  * 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."​ 
 + 
 +<​code>​ 
 + 
 +#​~/​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 
 +   
 +</​code>​
  
 \\ \\
 **[[cluster:​0|Back]]** **[[cluster:​0|Back]]**
cluster/158.1490792907.txt.gz · Last modified: 2017/03/29 09:08 (external edit)