# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=10000 HISTFILESIZE=20000 HISTTIMEFORMAT=${HISTTIMEFORMAT:-%F %H:%M:%S } USER=`whoami` HOSTNAME=`uname -n` MEMORY1=`free -t -m | grep "buffers/cache" | awk '{print $3" MB";}'` MEMORY2=`free -t -m | grep "Mem" | awk '{print $2" MB";}'` PSA=`ps -Afl | wc -l` # time of day DATE=$(date +"%F %H:%M:%S") #System uptime uptime=`cat /proc/uptime | cut -f1 -d.` upDays=$((uptime/60/60/24)) upHours=$((uptime/60/60%24)) upMins=$((uptime/60%60)) upSecs=$((uptime%60)) #System load LOAD1=`cat /proc/loadavg | awk {'print $1'}` LOAD5=`cat /proc/loadavg | awk {'print $2'}` LOAD15=`cat /proc/loadavg | awk {'print $3'}` #Host engine ENGINE=$(hosted-engine --vm-status|grep "Engine status") echo " - Current time........: $DATE - Current user........: $USER - Hostname............: $HOSTNAME - Release.............: `cat /etc/redhat-release` - Users...............: Currently `users | wc -w` user(s) logged on - CPU usage...........: $LOAD1, $LOAD5, $LOAD15 (1, 5, 15 min) - Memory used.........: $MEMORY1 / $MEMORY2 - Swap in use.........: `free -m | tail -n 1 | awk '{print $3}'` MB - Processes...........: $PSA running - System uptime.......: $upDays days $upHours hours $upMins minutes $upSecs seconds - Host engine status..: $ENGINE ==================================== volume status vm =============================== $(gluster volume status vm clients|grep 'Brick\|Clients') ==================================== volume status engine =========================== $(gluster volume status engine clients|grep 'Brick\|Clients') "