Table of Contents
What is SNMP service?
Configuring the SNMP service of Linux
Home Operation and Maintenance Linux Operation and Maintenance What does linux snmp service refer to?

What does linux snmp service refer to?

May 14, 2023 pm 01:49 PM
linux snmp

In Linux, the SNMP service refers to the Simple Network Management Protocol. It is a network management standard protocol widely used in TCP/IP networks. It provides a way to manage the network by running The central computer of the software (that is, the network management workstation) monitors and manages the standardized management framework (method) of the computer network. SNMP services enable network administrators to manage network performance, identify and resolve network problems, and plan for network growth.

What is SNMP service?

SNMP (Simple Network Management Protocol) is a network management standard protocol (application layer protocol) widely used in TCP/IP networks. It provides a central computer running network management software. (i.e. network management workstation) to monitor and manage the standardized management framework (method) of computer networks. Currently, three versions of SNMPv1, SNMPv2c and SNMPv3 have been promulgated, which are widely used in network equipment such as network switches, routers, and printers.

SNMP is a standard protocol specially designed for managing network nodes (servers, workstations, routers, switches, HUBS, etc.) in IP networks. It is an application layer protocol. SNMP enables network administrators to manage network performance, identify and resolve network problems, and plan for network growth. Network management systems are notified of network problems by receiving random messages (and event reports) via SNMP.

The predecessor of SNMP is the Simple Gateway Monitoring Protocol (SGMP), which is used to manage communication lines. Subsequently, people made great modifications to SGMP, especially adding SMI and MIB that conform to the Internet definition. The improved protocol is the famous SNMP. The SNMP network management framework based on TCP/IP is the current standard in the industry and consists of three main parts, namely the management information structure SMI (Structure of Management Information), the management information base MIB and the management protocol SNMP.

  • SMI defines the organization and identification of information used by the SNMP framework, and provides templates for MIB to define management objects and use management objects.

  • MIB defines a collection of management objects that can be accessed through SNMP.

  • The SNMP protocol is an application layer protocol that defines how the network manager reads and writes the MIB object of the agent process.

Configuring the SNMP service of Linux

1. Install the SNMP service

1 ) Check whether the snmp rpm package has been installed on the system

The following are the rpm packages needed to install the snmp service:

libsensors3-2.10.6-55.el5.i386.rpm
lm_sensors-2.10.6-55.el5.i386.rpm
net-snmp-libs-5.3.2.2-5.el5.i386.rpm
net-snmp-5.3.2.2-5.el5.i386.rpm
net-snmp-utils-5.3.2.2-5.el5.i386.rpm

It is recommended to download these from http://rpm.pbone.net/ rpm package, this website is relatively comprehensive and contains various versions of packages.

Use command: $ rpm -qa|grep snmp

Check whether net-snmp-utils-5.3.2.2-5.el5, net-snmp-libs is installed -5.3.2.2-5.el5, net-snmp-5.3.2.2-5.el5 three rpm packages

Use command: $ rpm -qa|grep libsen

Check whether libsensors3-2.10.6-55.el5 is installed

Use command: $ rpm -qa|grep lm

Check whether lm_sensors-2.10.6 is installed -55.el5

Note:

(1) There is a certain order for the installation of these packages, and there will be a prompt during installation. For example, when installing

net-snmp-5.3.2.2-5.el5.i386.rpm, you will be prompted that net-snmp-libs-5.3.2.2-5.el5.i386.rpm must be installed first.

(2) net-snmp-utils-5.3.2.2-5.el5.i386.rpm is not a package that must be installed, but installing it will bring a lot of help. It provides many tools, such as You can use the snmptranslate command to view oid, and you can use the snmpget, snmpwalk commands, etc.

(3)net-snmp-libs-5.3.2.2-5.el5.i386.rpm、net-snmp-5.3.2.2-5.el5.i386.rpm、

net The three packages -snmp-utils-5.3.2.2-5.el5.i386.rpm have certain version requirements and must be of the same version, otherwise the installation will not succeed. I am using the 5.3.2.2-5.el5 version here. You can also download other versions of rpm packages, but please note that the versions must be consistent. During installation, you will also be prompted as to which version of the package is necessary. You can download it according to the prompts. Required package.

2) Install the above rpm packages

If the above packages are not installed in the system, install them first.

Use command: rpm –ivh package name

After installation, use command: $ rpm -qa|grep snmp to check whether it has been installed Successful installation.

YUM installation:

yum install -y net-snmp net-snmp-utils

3) Start snmp service

If the installation is successful, you can use the command:

$ service snmpd start

Prompt :Starting snmpd: [ OK ], then the snmp service is started successfully.

You can set the snmp service to start automatically at boot, thus eliminating the trouble of manual startup.

Use the command: $ chkconfig snmpd on to set the snmpd service to start automatically at boot.

Then use the command: $ chkconfig --list | grep snmpd to check whether the setting has been successful.

4) Verify the snmp service

(1) Use the snmpwalk command to view the host name of the localhost of this machine

(2) Use the snmptranslate command, Check whether the snmp tool can use

(3) to test whether the remote host can obtain data.

I logged into another Linux host here, and the host also installed the snmp service and snmp tool according to the above steps. To obtain the data of the remote host through this host, you need to specify the IP address of the remote host

修改 SNMP 配置文件

1)配置文件路径

linux snmp服务指的是什么

2)修改配置文件

linux snmp服务指的是什么

重启 SNMP 服务

snmp 服务名 snmpd.service

# 启动/停止/查看 snmp 服务
systemctl start/stop/status snmpd.service

# 开启/禁用 snmp 自启动服务
systemctl enable/disable snmpd.service

使用 SNMP 软件获取 服务器信息

1)SNMP 中比较重要的配置

  • 读写设备的密码: 在 SNMP 中称为 读Community写Community
    若使用 SNMP v3 协议版本,则密码设置比较复杂,需要密码配对

  • 被读取的内容 :类似于被读取的参数的寄存器/地址,在 SNMP 中称为 OID

    • OID的描述方式:类似IP地址,如1.3.6.1.4.1.2021.1.1

  • MIB文件:各厂商制作的,包含设备OID的配置文件

    • 利用 SNMP 调试软件加载 MIB 文件,即可快速调试,读写设备的相关信息

    • MIB 文件中包含丰富内容:参数、参数的描述(帮助/含义)、参数的类型(数据类型)、参数的 OID 地址等

    • 不同厂商可根据自己设备的特点,修改 MIB 文件,以添加专属的可用于 SNMP 协议的参数

    • 加载错误的 MIB 文件,则 MIB 文件中记录的 OID 可能在设备中查询不到返回值

2)使用的 MIB 文件
HOST-RESOURCE-MIBUCD-SNMP

  • HOST-RESOURCE-MIB用于查看主机(服务器)的基础状态信息
    主要包含.1.3.6.1.2.1.25中的信息,这部分内容大多数电脑、服务器都有

  • UCD-SNMP Linux 和 Unix 系统通用的 MIB 描述文件
    主要包含.1.3.6.1.4.1.2021中的信息

3)使用的 SNMP 软件

linux snmp服务指的是什么

4)常用的 OID 地址


linux snmp服务指的是什么

linux snmp服务指的是什么

The above is the detailed content of What does linux snmp service refer to?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1502
276
How does the cost of ownership differ between Linux and Windows? How does the cost of ownership differ between Linux and Windows? Jun 09, 2025 am 12:17 AM

Linux's cost of ownership is usually lower than Windows. 1) Linux does not require license fees, saving a lot of costs, while Windows requires purchasing a license. 2) Linux has low hardware requirements and can extend the service life of the device. 3) The Linux community provides free support to reduce maintenance costs. 4) Linux is highly secure and reduces productivity losses. 5) The Linux learning curve is steep, but Windows is easier to use. The choice should be based on specific needs and budget.

How to install Linux alongside Windows (dual boot)? How to install Linux alongside Windows (dual boot)? Jun 18, 2025 am 12:19 AM

The key to installing dual systems in Linux and Windows is partitioning and boot settings. 1. Preparation includes backing up data and compressing existing partitions to make space; 2. Use Ventoy or Rufus to make Linux boot USB disk, recommend Ubuntu; 3. Select "Coexist with other systems" or manually partition during installation (/at least 20GB, /home remaining space, swap optional); 4. Check the installation of third-party drivers to avoid hardware problems; 5. If you do not enter the Grub boot menu after installation, you can use boot-repair to repair the boot or adjust the BIOS startup sequence. As long as the steps are clear and the operation is done properly, the whole process is not complicated.

How to enable the EPEL (Extra Packages for Enterprise Linux) repository? How to enable the EPEL (Extra Packages for Enterprise Linux) repository? Jun 17, 2025 am 09:15 AM

The key to enabling EPEL repository is to select the correct installation method according to the system version. First, confirm the system type and version, and use the command cat/etc/os-release to obtain information; second, enable EPEL through dnfinstallepel-release on CentOS/RockyLinux, and the 8 and 9 version commands are the same; third, you need to manually download the corresponding version of the .repo file and install it on RHEL; fourth, you can re-import the GPG key when encountering problems. Note that the old version may not be supported, and you can also consider enabling epel-next to obtain the test package. After completing the above steps, use dnfrepolist to verify that the EPEL repository is successfully added.

How to choose a Linux distro for a beginner? How to choose a Linux distro for a beginner? Jun 19, 2025 am 12:09 AM

Newbie users should first clarify their usage requirements when choosing a Linux distribution. 1. Choose Ubuntu or LinuxMint for daily use; programming and development are suitable for Manjaro or Fedora; use Lubuntu and other lightweight systems for old devices; recommend CentOSStream or Debian to learn the underlying principles. 2. Stability is preferred for UbuntuLTS or Debian; you can choose Arch or Manjaro to pursue new features. 3. In terms of community support, Ubuntu and LinuxMint are rich in resources, and Arch documents are technically oriented. 4. In terms of installation difficulty, Ubuntu and LinuxMint are relatively simple, and Arch is suitable for those with basic needs. It is recommended to try it first and then decide.

How to add a new disk to Linux How to add a new disk to Linux Jun 27, 2025 am 12:15 AM

The steps to add a new hard disk to the Linux system are as follows: 1. Confirm that the hard disk is recognized and use lsblk or fdisk-l to check; 2. Use fdisk or parted partitions, such as fdisk/dev/sdb and create and save; 3. Format the partition to a file system, such as mkfs.ext4/dev/sdb1; 4. Use the mount command for temporary mounts, such as mount/dev/sdb1/mnt/data; 5. Modify /etc/fstab to achieve automatic mount on the computer, and test the mount first to ensure correctness. Be sure to confirm data security before operation to avoid hardware connection problems.

Fixed the failure to upload files in Windows Google Chrome Fixed the failure to upload files in Windows Google Chrome Jul 08, 2025 pm 02:33 PM

Have problems uploading files in Google Chrome? This may be annoying, right? Whether you are attaching documents to emails, sharing images on social media, or submitting important files for work or school, a smooth file upload process is crucial. So, it can be frustrating if your file uploads continue to fail in Chrome on Windows PC. If you're not ready to give up your favorite browser, here are some tips for fixes that can't upload files on Windows Google Chrome 1. Start with Universal Repair Before we learn about any advanced troubleshooting tips, it's best to try some of the basic solutions mentioned below. Troubleshooting Internet connection issues: Internet connection

Where are system logs located in Linux? Where are system logs located in Linux? Jun 24, 2025 am 12:15 AM

Logs in Linux systems are usually stored in the /var/log directory, which contains a variety of key log files, such as syslog or messages (record system logs), auth.log (record authentication events), kern.log (record kernel messages), dpkg.log or yum.log (record package operations), boot.log (record startup information); log content can be viewed through cat, tail-f or journalctl commands; application logs are often located in subdirectories under /var/log, such as Apache's apache2 or httpd directory, MySQL log files, etc.; at the same time, it is necessary to note that log permissions usually require s

What is the sudo command and when should I use it? What is the sudo command and when should I use it? Jul 02, 2025 am 12:20 AM

sudo stands for "substituteuserdo" or "superuserdo", allowing users to run commands with permissions of other users (usually root). Its core uses include: 1. Perform system-level operations such as installing software or editing system files; 2. Accessing protected directories or logs; 3. Manage services such as restarting nginx; 4. Modify global settings such as /etc/hosts. When using it, the system will check the /etc/sudoers configuration and verify the user password, provide temporary permissions instead of continuously logging in as root, ensuring security. Best practices include: only when necessary, avoid blindly executing network commands, editing sudoers files with visudo, and considering continuous operations.

See all articles