osmtest: 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/osmtest - from package: opensm

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

On Debian possible default full paths are:

/usr/sbin/osmtest - from package: opensm

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