{
    "content": [
        {
            "type": "text",
            "text": "# SNMPTEST (man)\n\n## NAME\n\nsnmptest - communicates with a network entity using SNMP requests\n\n## SYNOPSIS\n\nsnmptest [COMMON OPTIONS] AGENT\n\n## DESCRIPTION\n\nsnmptest  is a flexible SNMP application that can monitor and manage information on a network\nentity.\n\n## TLDR\n\n> Start an interactive SNMP prompt.\n\n- Start the prompt:\n  `snmptest -v {{version}} -c {{community}} {{ip_address}}`\n- Display help:\n  `snmptest {{-h|--help}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (2 subsections)\n- **OPTIONS**\n- **EXAMPLES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "SNMPTEST",
        "section": "",
        "mode": "man",
        "summary": "snmptest - communicates with a network entity using SNMP requests",
        "synopsis": "snmptest [COMMON OPTIONS] AGENT",
        "tldr_summary": "Start an interactive SNMP prompt.",
        "tldr_examples": [
            {
                "description": "Start the prompt",
                "command": "snmptest -v {{version}} -c {{community}} {{ip_address}}"
            },
            {
                "description": "Display help",
                "command": "snmptest {{-h|--help}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [
            "The following is an example of sending a GET request for two OIDs:",
            "% snmptest -v 2c -c public testhost:9999",
            "Variable: system.sysDescr.0",
            "Variable: system.sysContact.0",
            "Variable:",
            "Received Get Response from 128.2.56.220",
            "requestid 0x7D9FCD63 errstat 0x0 errindex 0x0",
            "SNMPv2-MIB::sysDescr.0 = STRING: SunOS testhost 5.9 Generic112233-02 sun4u",
            "SNMPv2-MIB::sysContact.0 = STRING: x1111",
            "The following is an example of sending a GETNEXT request:",
            "Variable: SNMPv2-MIB::sysORUpTime",
            "Variable:",
            "Received Get Response from 128.2.56.220",
            "requestid 0x7D9FCD64 errstat 0x0 errindex 0x0",
            "SNMPv2-MIB::sysORUpTime.1 = Timeticks: (6) 0:00:00.06",
            "Variable:",
            "The following is an example of sending a SET request:",
            "Variable: $S",
            "Request type is Set Request",
            "Variable: system.sysLocation.0",
            "Type [i|u|s|x|d|n|o|t|a]: s",
            "Value: building 17",
            "Variable:",
            "Received Get Response from 128.2.56.220",
            "requestid 0x7D9FCD65 errstat 0x0 errindex 0x0",
            "SNMPv2-MIB::sysLocation.0 = STRING: building A",
            "Variable:",
            "The following is an example of sending a GETBULK request:",
            "Variable: $B",
            "Request type is Bulk Request",
            "Enter a blank line to terminate the list of non-repeaters",
            "and to begin the repeating variables",
            "Variable:",
            "Now input the repeating variables",
            "Variable: system.sysContact.0",
            "Variable: system.sysLocation.0",
            "Variable:",
            "What repeat count? 2",
            "Received Get Response from 128.2.56.220",
            "requestid 0x2EA7942A errstat 0x0 errindex 0x0",
            "SNMPv2-MIB::sysName.0 = STRING: testhost",
            "SNMPv2-MIB::sysORLastChange.0 = Timeticks: (58) 0:00:00.58",
            "SNMPv2-MIB::sysLocation.0 = STRING: bldg A",
            "SNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB",
            "Variable:",
            "The following is an example of sending an Inform request:",
            "snmptest -v 2c -c public snmptrapdhost",
            "Variable: $I",
            "Request type is Inform Request",
            "(Are you sending to the right port?)",
            "Variable: system.sysContact.0",
            "Type [i|u|sIx|d|n|o|t|a]: s",
            "Value: x12345",
            "Variable:",
            "Inform Acknowledged",
            "Variable:",
            "The snmptrapdhost will show:",
            "snmptrapdhost [<ip address>]: Trap SNMPv2-MIB::sysContact.0 = STRING: x12345",
            "The following is an example of sending an SNMPv2 Trap request:",
            "snmptest -v 2c -c public snmptrapdhost",
            "Variable: $T",
            "Request type is SNMPv2 Trap Request",
            "(Are you sending to the right port?)",
            "Variable: system.sysLocation.0",
            "Type [i|u|s|x|d|n|o|t|a]: s",
            "Value: building a",
            "Variable:",
            "The snmptrapdhost will show:",
            "snmptrapdhost [<ip address>]: Trap SNMPv2-MIB::sys.0 = STRING:",
            "building a"
        ],
        "see_also": [
            {
                "name": "snmpcmd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/snmpcmd/1/json"
            },
            {
                "name": "snmpget",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/snmpget/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"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 13,
                "subsections": [
                    {
                        "name": "Variable:",
                        "lines": 7
                    },
                    {
                        "name": "Variable:",
                        "lines": 82
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 87,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "snmptest - communicates with a network entity using SNMP requests\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "snmptest [COMMON OPTIONS] AGENT\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "snmptest  is a flexible SNMP application that can monitor and manage information on a network\nentity.\n\nAfter invoking the program, a command line interpreter proceeds to accept commands.  This in‐\ntepreter enables the user to send different types of SNMP requests to target agents.\n\nAGENT identifies a target SNMP agent, which is instrumented to monitor the given objects.  At\nits simplest, the AGENT specification will consist of a hostname or an IPv4 address.  In this\nsituation,  the command will attempt communication with the agent, using UDP/IPv4 to port 161\nof the given target host. See snmpcmd(1) for a full list of the possible formats for AGENT.\n\nOnce snmptest is invoked, the command line intepreter will prompt with:\n",
                "subsections": [
                    {
                        "name": "Variable:",
                        "content": "At this point you can enter one or more variable names, one per line.  A blank line ends  the\nparameter  input and will send the request (variables entered) in a single packet, to the re‐\nmote entity.  Each variable name is given in the format specified in variables(5).  For exam‐\nple:\n\nsnmptest -c public -v 1 zeus\nVariable: system.sysDescr.0"
                    },
                    {
                        "name": "Variable:",
                        "content": "will return some information about the request and reply packets, as well as the information:\n\nrequestid 0x5992478A errstat 0x0 errindex 0x0\nsystem.sysDescr.0 = STRING: \"Unix 4.3BSD\"\n\nThe  errstatus  value shows the error status code for the call.  The possible values for err‐\nstat are in the header file snmp.h.  The errindex value identifies the variable that has  the\ngiven  error.   Index  values  are  assigned  to all the variables entered at the \"Variable\":\nprompt. The first value is assigned an index of 1.\n\nUpon startup, the program defaults to sending a GET request packet.  The type of request  can\nbe changed by typing one of the following commands at the \"Variable:\" prompt:\n\n$G - send a GET request\n$N - send a GETNEXT request\n$S - send a SET request\n$B - send a GETBULK request\nNote: GETBULK is not available in SNMPv1\n$I - send an Inform request\n$T - send an SNMPv2 Trap request\n\nOther values that can be entered at the \"Variable:\" prompt are:\n\n$D - toggle the dumping of each sent and received packet\n$QP - toggle a quicker, less verbose output form\n$Q - Quit the program\n\nRequest Types:\n\nGET Request:\n\nWhen  in  \"GET  request\"  mode  ($G or default), the user can enter an OID at the \"Variable:\"\nprompt. The user can enter multiple OIDs, one per prompt. The user enters  a  blank  line  to\nsend the GET request.\n\nGETNEXT Request:\n\nThe \"GETNEXT request\" mode ($N) is similar to the \"Get request\" mode, described above.\n\nSET Request:\n\nWhen  in  the  \"SET  request\" mode ($S), more information is requested by the prompt for each\nvariable.  The prompt:\n\nType [i|s|x|d|n|o|t|a]:\nrequests the type of the variable be entered.  Depending on the type of  value  you  want  to\nset, you can type one of the following:\n\ni - integer\nu - unsigned integer\ns - octet string in ASCII\nx - octet string in hex bytes, separated by whitespace\nd - octet string as decimal bytes, separated by whitespace\na - ip address in dotted IP notation\no - object identifier\nn - null\nt - timeticks\nAt this point a value will be prompted for:\n\nValue:\n\nIf  this is an integer value, just type the integer (in decimal).  If it is a decimal string,\ntype in white-space separated decimal numbers, one per byte of  the  string.   Again  type  a\nblank line at the prompt for the variable name to send the packet.\n\nGETBULK Request:\n\nThe  \"GETBULK  request\" mode ($B) is similar to the \"Set request\" mode.  GETBULK, however, is\nnot available in SNMPv1.\n\nInform Request:\n\nThe \"Inform request\" mode ($I) is similar to the \"Set request\" mode.  This type  of  request,\nhowever,  is  not  available  in  SNMPv1. Also, the agent specified on the snmptest command\nshould correspond to the target snmptrapd agent.\n\nSNMPv2 Trap Request:\n\nThe \"SNMPv2 Trap Request\" mode ($T) is similar to the \"Set request\" mode.  This type  of  re‐\nquest,  however, is not available in SNMPv1. Also, the agent specified on the snmptest com‐\nmand should correspond to the target snmptrapd agent.\n"
                    }
                ]
            },
            "OPTIONS": {
                "content": "snmptest takes the common options described in the snmpcmd(1) manual page.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "The following is an example of sending a GET request for two OIDs:\n\n% snmptest -v 2c -c public testhost:9999\n\nVariable: system.sysDescr.0\nVariable: system.sysContact.0\nVariable:\nReceived Get Response from 128.2.56.220\nrequestid 0x7D9FCD63 errstat 0x0 errindex 0x0\nSNMPv2-MIB::sysDescr.0 = STRING: SunOS testhost 5.9 Generic112233-02 sun4u\nSNMPv2-MIB::sysContact.0 = STRING: x1111\n\nThe following is an example of sending a GETNEXT request:\n\nVariable: SNMPv2-MIB::sysORUpTime\nVariable:\nReceived Get Response from 128.2.56.220\nrequestid 0x7D9FCD64 errstat 0x0 errindex 0x0\nSNMPv2-MIB::sysORUpTime.1 = Timeticks: (6) 0:00:00.06\nVariable:\n\nThe following is an example of sending a SET request:\n\nVariable: $S\nRequest type is Set Request\nVariable: system.sysLocation.0\nType [i|u|s|x|d|n|o|t|a]: s\nValue: building 17\nVariable:\nReceived Get Response from 128.2.56.220\nrequestid 0x7D9FCD65 errstat 0x0 errindex 0x0\nSNMPv2-MIB::sysLocation.0 = STRING: building A\nVariable:\n\nThe following is an example of sending a GETBULK request:\n\nVariable: $B\nRequest type is Bulk Request\nEnter a blank line to terminate the list of non-repeaters\nand to begin the repeating variables\nVariable:\nNow input the repeating variables\nVariable: system.sysContact.0\nVariable: system.sysLocation.0\nVariable:\nWhat repeat count? 2\nReceived Get Response from 128.2.56.220\nrequestid 0x2EA7942A errstat 0x0 errindex 0x0\nSNMPv2-MIB::sysName.0 = STRING: testhost\nSNMPv2-MIB::sysORLastChange.0 = Timeticks: (58) 0:00:00.58\nSNMPv2-MIB::sysLocation.0 = STRING: bldg A\nSNMPv2-MIB::sysORID.1 = OID: IF-MIB::ifMIB\nVariable:\n\nThe following is an example of sending an Inform request:\n\nsnmptest -v 2c -c public snmptrapdhost\nVariable: $I\nRequest type is Inform Request\n(Are you sending to the right port?)\nVariable: system.sysContact.0\nType [i|u|sIx|d|n|o|t|a]: s\nValue: x12345\nVariable:\nInform Acknowledged\nVariable:\n\nThe snmptrapdhost will show:\n\nsnmptrapdhost [<ip address>]: Trap SNMPv2-MIB::sysContact.0 = STRING: x12345\n\nThe following is an example of sending an SNMPv2 Trap request:\n\nsnmptest -v 2c -c public snmptrapdhost\nVariable: $T\nRequest type is SNMPv2 Trap Request\n(Are you sending to the right port?)\nVariable: system.sysLocation.0\nType [i|u|s|x|d|n|o|t|a]: s\nValue: building a\nVariable:\n\nThe snmptrapdhost will show:\n\nsnmptrapdhost [<ip address>]: Trap SNMPv2-MIB::sys.0 = STRING:\nbuilding a\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "snmpcmd(1), snmpget(1), snmpset(1), variables(5)\n\n\n\nV5.9.1                                       25 Jul 2003                                 SNMPTEST(1)",
                "subsections": []
            }
        }
    }
}