You will always get this error in linux if you haven’t install netstat command. You have to install net-tools to resolve this error, you have to run below command to install it...
Centos
yum install net-tools
Ubuntu/Debian
sudo apt install net-tools
After installing net-tools you can run...