ibportstate: 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/ibportstate - from package: infiniband-diags

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

On Debian possible default full paths are:

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

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