Linux snmp oid's for CPU, memory and disk statistics

Source: Internet
Author: User
Tags snmp snmp oid snmpget
Systems (NMSS ). A managed device is a node that has an SNMP agent and resides on a managed network. these devices can be routers and Access Server, switches and bridges, hubs, computer hosts, or printers. an agent is a software module residing within a device. this agent translates information into a compatible format with SNMP. an NMS runs monitoring applications. they provide the bulk of processing and memory resources required for network management.

SNMP mibs, oids Overview

MiB stands for management information base and is a collection of information organized hierarchically. these are accessed using a protocol such as SNMP. there are two types of mibs: Scalar and tabular. scalar objects define a single object instance whereas Tabular objects define multiple related object instances grouped in MIB tables.
MIB files for specific devices or systems can be downloaded from here

Oids or Object Identifiers uniquely identify manged objects in a MIB hierarchy. this can be depicted as a tree, the levels of which are assigned by different organizations. top level MIB object IDS (oids) belong to different standard organizations. vendors define private branches including managed objects for their own products.

Here is a sample structure of an oId

ISO (1 ). org (3 ). DOD (6 ). internet (1 ). private (4 ). transition (868 ). products (2 ). chassis (4 ). card (1 ). slotcps (2) & shy;
. & Shy; cpsslotsummary (1). cpsmoduletable (1). cpsmoduleentry (1). cpsmodulemodel (3). 3562.3

Most of the people may be looking for OID's for Linux OID's for CPU, memory and disk statistics for this first you need to install SNMP server and clients. if you want to install SNMP server and client installation in Linux learning check here

CPU statistics

Load
1 minute load:. 1.3.6.1.4.1.2021.10.1.3.1
5 minute load:. 1.3.6.1.4.1.2021.10.1.3.2
15 minute load:. 1.3.6.1.4.1.2021.10.1.3.3

CPU
Percentage of user CPU time:. 1.3.6.1.4.1.2021.11.9.0
Raw user CPU time:. 1.3.6.1.4.1.2021.11.50.0
Percentages of system CPU time:. 1.3.6.1.4.1.2021.11.10.0
Raw system CPU time:. 1.3.6.1.4.1.2021.11.52.0
Percentages of idle CPU time:. 1.3.6.1.4.1.2021.11.11.0
Raw idle CPU time:. 1.3.6.1.4.1.2021.11.53.0
Raw nice CPU time:. 1.3.6.1.4.1.2021.11.51.0

Memory statistics

Total swap size:. 1.3.6.1.4.1.2021.4.3.0
Available swap space:. 1.3.6.1.4.1.2021.4.4.0
Total RAM in machine:. 1.3.6.1.4.1.2021.4.5.0
Total RAM used:. 1.3.6.1.4.1.2021.4.6.0
Total Ram free:. 1.3.6.1.4.1.2021.4.11.0
Total Ram shared:. 1.3.6.1.4.1.2021.4.small
Total Ram buffered:. 1.3.6.1.4.1.2021.4.14.0
Total cached memory:. 1.3.6.1.4.1.2021.4.15.0

Disk statistics

The snmpd. conf needs to be edited. Add the following (assuming a machine with a single '/' partition ):

Disk/100000 (OR)

Includealldisks 10% for all partitions and disks

The oids are as follows

Path where the disk is mounted:. 1.3.6.1.4.1.2021.9.1.2.1
Path of the device for the partition:. 1.3.6.1.4.1.2021.9.1.3.1
Total size of the disk/partion (Kbytes):. 1.3.6.1.4.1.2021.9.1.6.1
Available space on the disk:. 1.3.6.1.4.1.2021.9.1.7.1
Used space on the disk:. 1.3.6.1.4.1.2021.9.1.8.1
Percentage of space used on disk:. 1.3.6.1.4.1.2021.9.1.9.1
Percentage of inodes used on disk:. 1.3.6.1.4.1.2021.9.1.10.1

System uptime:. 1.3.6.1.2.1.1.3.0

Examples

These commands you need to run on the SNMP Server

Get available disk space for/on the target host

# Snmpget-V 1-C "community" target_name_or_ip. 1.3.6.1.4.1.2021.9.1.7.1

This will return available disk space for the first entry in the 'disk' section of snmpd. conf; replace 1 with N for the nth entry

Get the 1-minute system load on the target host

# Snmpget-V 1-C "community" target_name_or_ip. 1.3.6.1.4.1.2021.10.1.3.1

Get the 5-minute system load on the target host

# Snmpget-V 1-C "community" target_name_or_ip. 1.3.6.1.4.1.2021.10.1.3.2

Get the 15-minute system load on the target host

# Snmpget-V 1-C "community" target_name_or_ip. 1.3.6.1.4.1.2021.10.1.3.3

Get amount of available swap space on the target host

# Snmpget-V 1-C "community" target_name_or_ip. 1.3.6.1.4.1.2021.4.4.0

For more information, see:

Http://www.alvestrand.no/objectid/top.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.