mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 11:42:05 +00:00
Mellanox OFED/Adapter firmware levels and update the adapter firmware level independent on installing a new version of OFED
29 lines
698 B
Bash
Executable File
29 lines
698 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Sample postscript that can be executed to check the Mellanox OFED version
|
|
# and adapter firmware level on the Mellanox adapters installed on the target nodes
|
|
#
|
|
#
|
|
BINARIES="ofed_info mst ibdev2netdev"
|
|
for PROG in ${BINARIES}; do
|
|
RC=`command -v ${PROG} >> /dev/nul 2>&1; echo $?`
|
|
if [[ ${RC} != 0 ]]; then
|
|
echo "${PROG} is not installed on this node, unable to check firmware levels."
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
MELLANOX_SOFTWARE=`ofed_info -s | cut -d: -f1`
|
|
echo "Mellanox Software: $MELLANOX_SOFTWARE"
|
|
|
|
|
|
mst start >> /dev/null
|
|
if [[ $? != 0 ]]; then
|
|
echo "Error: Could not start mst, cannot check adapter firmware level."
|
|
exit 1
|
|
fi
|
|
|
|
ibdev2netdev -v
|
|
|
|
exit 0
|