blob: 24a924aca7ea196a9e51154c49f67fd884a55be5 [file] [log] [blame]
Thomas Vachuskacba486a2017-08-02 11:04:59 -07001#!/bin/bash
2#-------------------------------------------------------------------------------
3# Utility to view status of the cell warden and cell slaves
4#-------------------------------------------------------------------------------
5
6echo "========================================================"
7status=$(ssh sdn@$CELL_WARDEN ps -ef | grep warden | grep -v grep)
8let ok=$?
9[ $ok -eq 0 ] && echo "Warden is running" || echo "Warden is stopped"
10echo $status
11for slave in $CELL_SLAVES; do
12 echo "========================================================"
13 echo "$slave:"
Thomas Vachuskafd9939b2018-02-07 15:48:26 -080014 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 Vachuskacba486a2017-08-02 11:04:59 -070018 ssh sdn@$slave sudo lxc-ls --fancy
19 let ok=ok+$?
20done
21exit $ok