I have created a SNMP agent simulator application which use the port number 161 for the simulated devices. sometimes it occurs the port alredy in use exception. how can i know if the 161 port is busy or not?
By using netstat command.
Specifically,
netstat -s [PORT_NO]
For example,
netstat -s 161