cluster:158
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| cluster:158 [2017/03/29 13:08] – created hmeij07 | cluster:158 [2017/03/29 13: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 / | + | * Written because |
| - | * [[cluster: | + | * What the heck is an [[cluster: |
| + | |||
| + | * Newer example showing the integration of GPU availability into Openlava using eLim. | ||
| + | * [[cluster: | ||
| + | |||
| + | * Example of managing licenses. | ||
| + | * "James Davis wrote: Here is my full updated elim that works with polling a FLEXLM license server with lmutil lmstat | ||
| + | |||
| + | < | ||
| + | |||
| + | # | ||
| + | |||
| + | # | ||
| + | |||
| + | # | ||
| + | |||
| + | #declare the features we want to search for | ||
| + | |||
| + | declare -a features=( | ||
| + | |||
| + | ' | ||
| + | |||
| + | ' | ||
| + | |||
| + | ' | ||
| + | |||
| + | ' | ||
| + | |||
| + | ) | ||
| + | |||
| + | #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=" | ||
| + | |||
| + | for i in ${features[@]}; | ||
| + | |||
| + | #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=`/ | ||
| + | |||
| + | #issued is the 1st numbers found | ||
| + | |||
| + | issued=`echo $line | sed -r ' | ||
| + | |||
| + | #used is the 2nd numbers found | ||
| + | |||
| + | used=`echo $line | sed -r ' | ||
| + | |||
| + | #subtract total and in use to get how many licenses are available | ||
| + | |||
| + | available=$((issued-used)) | ||
| + | |||
| + | # | ||
| + | |||
| + | output+=" | ||
| + | |||
| + | | ||
| + | |||
| + | echo " | ||
| + | |||
| + | sleep 60 | ||
| + | |||
| + | done | ||
| + | |||
| + | </ | ||
| \\ | \\ | ||
| **[[cluster: | **[[cluster: | ||
cluster/158.1490792907.txt.gz · Last modified: (external edit)
