Skip to content

Commit

Permalink
Merge pull request Azure#474 from arstgr/master
Browse files Browse the repository at this point in the history
Update node_healthchecks.sh
  • Loading branch information
xpillons authored Mar 1, 2021
2 parents b49cb33 + 5e1b40d commit 36560d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/simple_hpc_pbs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"type": "vmss",
"vm_type": "variables.vm_type",
"instances": "variables.compute_instances",
"accelerated_networking": false,
"low_priority": "variables.low_priority",
"image": "variables.hpc_image",
"subnet": "compute",
Expand Down
9 changes: 5 additions & 4 deletions scripts/node_healthchecks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ function check_ib_device()
standard_hc44rs|standard_hb60rs|standard_hb120rs_v2)
# Retrieve IB info
ib_device=$(ifconfig | grep ib0 -A1 | grep inet | tr -s ' ' | cut -d' ' -f 3)
IBDV=$(ibdev2netdev | grep "ib0" | awk -F ' ' '{print $1}')
if [ -n "$ib_device" ]; then
IB_STATE=$(ibv_devinfo | grep state | xargs | cut -d' ' -f2)
IB_RATE=$(ibv_devinfo -v | grep active_width | cut -d':' -f2 | xargs | cut -d' ' -f1)
IB_SPEED=$(ibv_devinfo -v | grep active_speed | cut -d':' -f2 | xargs | cut -d'(' -f1 | xargs)
IB_PHYS_STATE=$(ibv_devinfo -v | grep phys_state | cut -d':' -f2 | xargs | cut -d' ' -f1)
IB_STATE=$(ibv_devinfo -d $IBDV | grep state | xargs | cut -d' ' -f2)
IB_RATE=$(ibv_devinfo -d $IBDV -v | grep active_width | cut -d':' -f2 | xargs | cut -d' ' -f1)
IB_SPEED=$(ibv_devinfo -d $IBDV -v | grep active_speed | cut -d':' -f2 | xargs | cut -d'(' -f1 | xargs)
IB_PHYS_STATE=$(ibv_devinfo -d $IBDV -v | grep phys_state | cut -d':' -f2 | xargs | cut -d' ' -f1)
else
echo "ERROR : No IB devices found"
bad_node=1
Expand Down

0 comments on commit 36560d4

Please sign in to comment.