#!/bin/bash # # Written by Imran Aziz Ahmed (imran.ahmed2@hpe.com) # Date: Mon 17 Feb 2025 02:21:52 PM +03 # /usr/bin/clear echo if [ "$USER" != "root" ] then echo "This script needs to be executed as root." echo "Exiting..." exit 1 fi echo -e "\e[4mCabinet type\e[0m" echo pdsh -g cdu cat /var/volatile/cec/cab_type | head -n 1 | awk '{print $2 " " $3}' echo echo -e "\e[4mOS and HPCM versions\e[0m" echo cat /etc/*release echo echo -e "\e[4mSLURM version\e[0m" echo if ping -c1 slurm1 > /dev/null; then ssh -o LogLevel=error slurm1 sinfo -V else if ping -c1 slurm2 > /dev/null; then ssh -o LogLevel=error slurm2 sinfo -V else echo "Unable to check CPE versions installed since none of the login nodes [login1-login3] are up." fi fi echo echo -e "\e[4mCPE versions installed\e[0m" echo if ping -c1 login2 > /dev/null; then ssh -o LogLevel=error login2 ls -ltr /opt/cray/pe/cpe else if ping -c1 login3 > /dev/null; then ssh -o LogLevel=error login3 ls -ltr /opt/cray/pe/cpe else if ping -c1 login4 > /dev/null; then ssh -o LogLevel=error login4 ls -ltr /opt/cray/pe/cpe else echo "Unable to check CPE versions installed since none of the login nodes [login1-login3] are up." fi fi fi echo echo -e "\e[4mCOS version (pick up the latest)\e[0m" echo cm repo show | grep COS echo echo -e "\e[4mSlingshot version\e[0m" echo if ping -c1 fmn1 > /dev/null; then ssh fmn1 fmn-show-version else if ping -c1 fmn2 > /dev/null; then ssh fmn2 fmn-show-version else echo "Unable to extract Slingshot version since none of the Fabric Manager nodes are up." fi fi echo echo -e "\e[4mSlingshot host software (SHS) version\e[0m" echo ssh nid00001 rpm -qa | grep -i sling | grep SHS | head -n 1 echo echo -e "\e[4mUSS version\e[0m" echo ssh nid00001 cat /opt/cray/etc/release/uss echo echo -e "\e[4mLustre version (client)\e[0m" echo if ping -c1 login2 > /dev/null; then ssh -o LogLevel=error login2 lctl get_param version else if ping -c1 login3 > /dev/null; then ssh -o LogLevel=error login3 lctl get_param version else if ping -c1 login4 > /dev/null; then ssh -o LogLevel=error login4 lctl get_param version else echo "Unable to check CPE versions installed since none of the login nodes [login1-login3] are up." fi fi fi echo