sonetdiag: 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 Debian possible default full paths are:

/usr/bin/sonetdiag - from package: atm-tools

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