The advantages of the Protocol SNMP protocol for network management allow many people to use it. Now let's explain the source code parsing of snmpd extensions in the ucd-snmp tool. This article involves three snmpd extension methods. Then we will explain them separately. First, let's give a brief introduction to the snmpd command. For those who often access this command, we all know that the snmpd command is a daemon process that responds to SNMP requests. The standard syntax format is:
snmpd [OPTIONS] [LISTENING ADDRESSES]
The syntax format is snmpd followed by an option or listening address.
Snmpd Extension Method 1: static link form
First, generate two files, ustScalarSet. h and ustScalarSet. c. Copy it to the agent/mibgroup subdirectory under the downloaded ucd-snmp source code directory. for example, on my machine, the source code of ucd-snmp 4.2.1 is in the/usr/local/src/ucd-snmp-4.2.1, the target directory of the corresponding copy is, /usr/local/src/ucd-snmp-4.2.1/agent/mibgroup.
In the home directory of ucd-snmp 4.2.1 (my machine is/usr/local/src/ucd-snmp-4.2.1), run the command in the following sequence
# ./configure -with-mib-modules="ustScalarSet"# make# make install
In this way, the new agent generates and installs. Runs the SNMP agent.
# /usr/local/sbin/snmpd
You can use any of the following commands to retrieve the newly added MIB variables using the corresponding tool program:
% /usr/local/bin/snmpget localhost public UCD-SNMP-TUTORIAL-MIB::ustSSSimpleString.0% /usr/local/bin/snmpwalk localhost public UCD-SNMP-TUTORIAL-MIB::ustScalarSet