portsnmp

SNMP error with port already in use


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?


Solution

  • By using netstat command.

    Specifically,

    netstat -s [PORT_NO]

    For example,

    netstat -s 161

    1. http://www.techrepublic.com/blog/security/list-open-ports-and-listening-services/443
    2. http://www.speedguide.net/faq_in_q.php?qid=115