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 | fd9939b | 2018-02-07 15:48:26 -0800 | [diff] [blame] | 14 | ssh sdn@$slave "touch foo && echo 'Disk OK' || echo 'Disk READ-ONLY'" |
| 15 | let ok=ok+$? |
Thomas Vachuska | 1c8b7ab | 2019-03-11 12:49:20 -0700 | [diff] [blame] | 16 | ssh sdn@$slave "uptime" |
| 17 | let ok=ok+$? |
Thomas Vachuska | fd9939b | 2018-02-07 15:48:26 -0800 | [diff] [blame] | 18 | ssh sdn@$slave "df -h /" |
| 19 | let ok=ok+$? |
Thomas Vachuska | cba486a | 2017-08-02 11:04:59 -0700 | [diff] [blame] | 20 | ssh sdn@$slave sudo lxc-ls --fancy |
| 21 | let ok=ok+$? |
| 22 | done |
| 23 | exit $ok |