ibhosts: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/sbin/ibhosts - from package: infiniband-diags

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/sbin/ibhosts - from package: infiniband-diags

You may install the required package with command apt-get install {package}
Error in other languages:
ibhosts: bevel nie gevind nie
ibhosts: comandă negăsită
ibhosts: comando não encontrado
ibhosts: commande introuvable
ibhosts: command not found
ibhosts: käsku ei ole
ibhosts: không tìm thấy lệnh
ibhosts: komanda nerasta
ibhosts: Kommando nicht gefunden.
ibhosts: kommandot finns inte
ibhosts: komut yok
ibhosts: nie znaleziono polecenia
ibhosts: níor aimsíodh an t-ordú
ibhosts: no se encontró la orden
ibhosts: no s'ha trobat l'ordre
ibhosts: opdracht niet gevonden
ibhosts: parancs nem található
ibhosts: perintah tidak ditemukan
ibhosts: príkaz nenájdený
ibhosts: příkaz nenalezen
ibhosts: команда не найдена
ibhosts: командата не е открита
ibhosts: 命令找不到
ibhosts: コマンドが見つかりません