{
    "mode": "man",
    "parameter": "snmptrap",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/snmptrap/1/json",
    "generated": "2026-09-01T10:18:01Z",
    "synopsis": "snmptrap  -v  1 [COMMON OPTIONS] AGENT enterprise-oid agent generic-trap specific-trap uptime\n[OID TYPE VALUE]...\nsnmptrap -v [2c|3] [COMMON OPTIONS] [-Ci] AGENT uptime trap-oid [OID TYPE VALUE]...\nsnmpinform -v [2c|3] [COMMON OPTIONS] AGENT uptime trap-oid [OID TYPE VALUE]...",
    "sections": {
        "NAME": {
            "content": "snmptrap, snmpinform - sends an SNMP notification to a manager\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "snmptrap  -v  1 [COMMON OPTIONS] AGENT enterprise-oid agent generic-trap specific-trap uptime\n[OID TYPE VALUE]...\n\nsnmptrap -v [2c|3] [COMMON OPTIONS] [-Ci] AGENT uptime trap-oid [OID TYPE VALUE]...\n\nsnmpinform -v [2c|3] [COMMON OPTIONS] AGENT uptime trap-oid [OID TYPE VALUE]...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "snmptrap is an SNMP application that uses the SNMP TRAP operation to send  information  to  a\nnetwork manager.  One or more object identifiers (OIDs) can be given as arguments on the com‐\nmand  line.  A type and a value must accompany each object identifier.  Each variable name is\ngiven in the format specified in variables(5).\n\nWhen invoked as snmpinform, or when -Ci is added to the command line flags  of  snmptrap,  it\nsends an INFORM-PDU, expecting a response from the trap receiver, retransmitting if required.\nOtherwise it sends an TRAP-PDU or TRAP2-PDU.\n\nIf  any of the required version 1 parameters, enterprise-oid, agent, and uptime are specified\nas empty, it defaults to 1.3.6.1.4.1.3.1.1 (enterprises.cmu.1.1), hostname,  and  host-uptime\nrespectively.\n\nThe TYPE is a single character, one of:\ni  INTEGER\nu  UNSIGNED\nc  COUNTER32\ns  STRING\nx  HEX STRING\nd  DECIMAL STRING\nn  NULLOBJ\no  OBJID\nt  TIMETICKS\na  IPADDRESS\nb  BITS\nwhich are handled in the same way as the snmpset command.\n\nThe  AGENT  argument is only embedded in SNMP TRAP PDUs but not in SNMP INFORM PDUs. If AGENT\nis not an empty string, it must be an IPv4 address. This limitation comes from RFC  1157,  in\nwhich the agent address field is defined as follows:\n\nagent-addr NetworkAddress, -- address of object generating trap\n\nFrom RFC 1155:\n\nNetworkAddress ::=\nCHOICE {\ninternet IpAddress\n}\n[ ... ]\nIpAddress ::=\n[APPLICATION 0]          -- in network-byte order\nIMPLICIT OCTET STRING (SIZE (4))\n\nAn example of how to use snmptrap:\n\nsnmptrap  -v  1 -c public manager enterprises.spider test-hub 3 0 '' interfaces.iftable.ifen‐\ntry.ifindex.1 i 1\n\nwill send a generic linkUp trap to manager, for interface 1.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "snmptrap takes the common options described in the snmpcmd(1) manual page in addition to  the",
            "subsections": [
                {
                    "name": "-Ci",
                    "content": "query as described there.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "snmpcmd(1), snmpset(1), variables(5).\n\nV5.9.4.pre2                                  19 Jun 2003                                 SNMPTRAP(1)",
            "subsections": []
        }
    },
    "summary": "snmptrap, snmpinform - sends an SNMP notification to a manager",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "query as described there."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "snmpcmd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/snmpcmd/1/json"
        },
        {
            "name": "snmpset",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/snmpset/1/json"
        },
        {
            "name": "variables",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/variables/5/json"
        }
    ]
}