Thomas Vachuska | cba486a | 2017-08-02 11:04:59 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | #------------------------------------------------------------------------------- |
| 3 | # Utility to view status of the cell warden and cell slaves |
| 4 | #------------------------------------------------------------------------------- |
| 5 | |
| 6 | echo "========================================================" |
| 7 | status=$(ssh sdn@$CELL_WARDEN ps -ef | grep warden | grep -v grep) |
| 8 | let ok=$? |
| 9 | [ $ok -eq 0 ] && echo "Warden is running" || echo "Warden is stopped" |
| 10 | echo $status |
| 11 | for slave in $CELL_SLAVES; do |
| 12 | echo "========================================================" |
| 13 | echo "$slave:" |
Thomas Vachuska | 86d2df0 | 2018-04-27 18:24:27 -0700 | [diff] [blame] | 14 | ssh sdn@$slave "touch foo && echo 'Disk OK' || echo 'Disk READ-ONLY'" |
| 15 | let ok=ok+$? |
| 16 | ssh sdn@$slave "df -h /" |
| 17 | let ok=ok+$? |
Thomas Vachuska | cba486a | 2017-08-02 11:04:59 -0700 | [diff] [blame] | 18 | ssh sdn@$slave sudo lxc-ls --fancy |
| 19 | let ok=ok+$? |
| 20 | done |
| 21 | exit $ok |