Continuously check nestat output for a particular program
- by Vihaan Verma
I have a android emulator running on port 5554. I want to continuously watch the netstat output concerning emulator stuff.
right now I have to manually execute this command every time
sudo netstat -plant | grep emulator
I thought doing something like this would repeat above command automatically every 2 sec.
watch sudo netstat -plant | grep emulator
but instead it hangs the terminal. How to achieve such functionality ? Thanks