Skip to content
Snippets Groups Projects
Commit ff8abc6c authored by Holger Brandl's avatar Holger Brandl
Browse files

renamed some lsf utils

parent fefcca04
No related branches found
No related tags found
No related merge requests found
......@@ -226,28 +226,30 @@ mysub(){
export -f mysub
#mysub testjob "echo test; echo blabla 1>&2;" -q medium
rmEmptyLogFiles(){ find . -maxdepth 1 -name ".log" -type f -empty -print0 | xargs -0 echo rm -f ; }
export -f rmEmptyLogFiles
## really needed ??
#rm_emptylogs(){ find . -maxdepth 1 -name ".log" -type f -empty -print0 | xargs -0 echo rm -f ; }
#export -f rm_emptylogs
zipRmLogFiles(){
if [ $# -lt 2 ]; then echo "Usage: zipRmLogFiles <tarbasename> [<logfile>]+"; return; fi
tarName=$(date +'%y%m%d')_"$1"_logs.tar.gz; shift
ziprm(){
if [ $# -lt 2 ]; then echo "Usage: ziprm <tarbasename> [<file>]+"; return; fi
tarName=$(date +'%y%m%d')_"$1".tar.gz; shift
tar czf $tarName $@; rm $@;
}
export -f zipRmLogFiles
export -f ziprm
## lock a node
lockNode(){
nlock(){
bsub -J "node_locker" -R span[hosts=1] -n 6 -q long 'echo "locked $HOSTNAME" >> ~/locked_worker.txt; sleep 10h' | joblist /tmp/tmp.gHDskZ7c77
mailme "locked node: $(tail -n1 ~/locked_worker.txt | cut -d' ' -f2)"
# ssx $(tail -n1 ~/locked_hosts.txt | cut -d' ' -f2)
# jlistKill $tmpJoblistFile
}
export -f nlock
#isubNode(){
# tmpJoblistFile=$(mktemp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment