Changeset 40139
- Timestamp:
- Sep 18, 2017, 8:48:44 AM (9 years ago)
- File:
-
- 1 edited
-
tags/ipp-20170121/tools/check_system.sh (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20170121/tools/check_system.sh
r40100 r40139 262 262 endif 263 263 264 if ("$1" == "restart.block") then 265 touch ~/.restart.block 266 exit 0 267 endif 268 269 if ("$1" == "restart.clear") then 270 rm -f ~/.restart.block 271 exit 0 272 endif 273 274 if ("$1" == "restart.check") then 275 if ( -f ~/.restart.block ) then 276 echo "check_system.sh stop.block.restart is currently BLOCKED" 277 else 278 echo "check_system.sh stop.block.restart is currently NOT BLOCKED" 279 endif 280 exit 0 281 endif 282 264 283 if ("$1" == "stop.block.restart") then 265 284 266 # set all controllers to reap first, then block waiting for clear task list: 285 if ( -f ~/.restart.block ) then 286 echo "check_system.sh stop.block.restart is currently BLOCKED" 287 exit 1 288 endif 289 290 # set all pantasks to stop 267 291 foreach dir ($dirs) 268 292 echo "setting $dir to 'reap'" … … 270 294 end 271 295 296 # set all controllers to reap, then block waiting for clear task list: 297 foreach dir ($dirs) 298 echo "setting $dir to 'reap'" 299 echo "controller run reap" | pantasks_client -c $dir/ptolemy.rc >& /dev/null 300 end 301 272 302 set tmpfile = `mktemp /tmp/pantasks.XXXXXX` 273 303 … … 276 306 echo "waiting for jobs to clear on $dir" 277 307 308 # wait for at most 15 minutes (the stamp jobs may take 750 seconds to complete) 278 309 set Njobs = 1 279 310 set Nloop = 0 280 while ($Nloop < 30)311 while ($Nloop < 90) 281 312 echo "control status -nohost -state busy" | pantasks_client -c $dir/ptolemy.rc >& $tmpfile 282 313 set Njobs = `awk '($3 == "BUSY"){print $0}' $tmpfile | wc -l`
Note:
See TracChangeset
for help on using the changeset viewer.
