SNMP MIB库
-- mib文件的开头指定文件名,并且使用BEGIN开始,文件的最后用END结束
-- IMPORTS就相当与c语言中的include,包含需要使用的一些数据类型
-- 通过FROM指定引用的来源
MOXA-CN2600-MIB DEFINITIONS ::= BEGIN
IMPORTS
enterprises,
IpAddress,
OBJECT-TYPE FROM SNMPv2-SMI
DateAndTime,
TEXTUAL-CONVENTION,
MacAddress,
DisplayString FROM SNMPv2-TC; -- 不同的公司在enterprises节点下注册注册自己的id,moxa的节点是8691
-- 使用OBJECT IDENTIFIER指定OID
moxa OBJECT IDENTIFIER ::= { enterprises } -- 1.3.6.1.4.1.
-- 指定nport串口服务器是在moxa节点下的分支,id是2
-- oid: 1.3.6.1.4.1.8691.2
nport OBJECT IDENTIFIER ::= { moxa } -- 1.3.6.1.4.1.8691.2
-- 产品型号cn2600,是在nport串口服务器分支下,节点是11
-- oid: 1.3.6.1.4.1.8691.2.
cn2600 MODULE-IDENTITY
LAST-UPDATED "201003040000Z"
ORGANIZATION "Moxa Inc."
CONTACT-INFO
"Email: support@moxa.com
Tel : + ext." DESCRIPTION
"The MIB module for Moxa Terminal Server CN2600 series specific information." ::= { nport } -- 1.3.6.1.4.1.8691.2. -- -------------------------------------------------------------
-- groups in the MOXA-CN2600-2AC MIB
-- ------------------------------------------------------------- swMgmt OBJECT IDENTIFIER ::= { cn2600 } -- 1.3.6.1.4.1.8691.2.11.1 -- -------------------------------------------------------------
-- Textual Conventions
-- ------------------------------------------------------------- PortList ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"Each octet within this value specifies a set of eight
ports, with the first octet specifying ports through
, the second octet specifying ports through , etc.
Within each octet, the most significant bit represents
the lowest numbered port, and the least significant bit
represents the highest numbered port. Thus, each port
of the bridge is represented by a single bit within the
value of this object. If that bit has a value of ''
then that port is included in the set of ports; the port
is not included if its bit has a value of ''."
SYNTAX OCTET STRING -- -------------------------------------------------------------
-- swMgmt group
-- ------------------------------------------------------------- -- -------------------------------------------------------------
-- Overview
-- ------------------------------------------------------------- overview OBJECT IDENTIFIER ::= { swMgmt } -- 1.3.6.1.4.1.8691.2.11.1.
-- 模块名称
-- 类型:DisplayString,类似字符串
-- 访问权限:只读
-- 状态:当前
-- id: overview
-- 1.3.6.1.4.1.8691.2.11.1.1.1
modelName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The model name of the CN2600."
::= { overview } -- 1.3.6.1.4.1.8691.2.11.1.1.1
-- 数据类型:整型
serialNumber OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The serial number of the CN2600. Every Terminal Server CN2600
series is assigned a unique serial
number before it is shipped."
::= { overview } firmwareVersion OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The version of the firmware currently running on the CN2600."
::= { overview }
-- 类型:ip地址
viewLan1IpAddress OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The IP address of the CN2600's LAN1 interface."
::= { overview }
-- 类型:mac地址
viewLan1MacAddress OBJECT-TYPE
SYNTAX MacAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The MAC address of the CN2600's LAN1 interface."
::= { overview } -- 省略其中的一些。。。。。 -- 可以指定整型的范围之后0,1两个值,类似枚举
-- 前面的"power-off","power-on"用于描述
power1Status OBJECT-TYPE
SYNTAX INTEGER {
power-off(),
power-on()
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The on/off status of power 1"
::= { overview } power2Status OBJECT-TYPE
SYNTAX INTEGER {
power-off(),
power-on()
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The on/off status of power 2 for 2AC model"
::= { overview } -- -------------------------------------------------------------
-- Basic settings
-- ------------------------------------------------------------- basicSetting OBJECT IDENTIFIER ::= { swMgmt } -- 1.3.6.1.4.1.8691.2.11.1. -- -------------------------------------------------------------
-- Basic settings -> Server settings
-- ------------------------------------------------------------- serverSetting OBJECT IDENTIFIER ::= { basicSetting } -- 1.3.6.1.4.1.8691.2.11.1.2.1 serverName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A text string used to identify the CN2600."
::= { serverSetting } serverLocation OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"A text string used to identify the location of the CN2600. This
option is useful for specifying the location or
application of different CN2600."
::= { serverSetting } -- -------------------------------------------------------------
-- Basic settings -> Time settings
-- ------------------------------------------------------------- timeSetting OBJECT IDENTIFIER ::= { basicSetting } -- 1.3.6.1.4.1.8691.2.11.1.2.2
-- 时间设置,可以进行读写
timeZone OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The time-zone index of the CN2600."
::= { timeSetting } localTime OBJECT-TYPE
SYNTAX DateAndTime
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The system time in seconds since 1970/1/1."
::= { timeSetting } -- -------------------------------------------------------------
-- Serial port settings
-- ------------------------------------------------------------- portSetting OBJECT IDENTIFIER ::= { swMgmt } -- 1.3.6.1.4.1.8691.2.11.1.2.4 -- -------------------------------------------------------------
-- Serial port settings -> Operation Modes settings
-- ------------------------------------------------------------- opModeSetting OBJECT IDENTIFIER ::= { portSetting } -- 1.3.6.1.4.1.8691.2.11.1.2.4. -- --------------------------------------------------------------------------------------
-- Serial port settings -> Operation Modes settings -> Operation Modes
-- -------------------------------------------------------------------------------------- opMode OBJECT IDENTIFIER ::= { opModeSetting } -- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1
-- 表类型的定义
-- 使用SEQUENCE OF定义一种新的类型OpModePortEntry
-- 有点像C语言中结构体的定义
-- opModePortTable是表名,开头必须小写,并且结尾必须包含"Table"
-- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1.
opModePortTable OBJECT-TYPE
SYNTAX SEQUENCE OF OpModePortEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The serial ports' operation mode table."
::= { opMode }
-- 表中一行的名称:opModePortEntry,每行数据的数据类型是一样的
-- 类型是:OpModePortEntry
-- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1.1.1
-- 表中第一个必须是INDEX,作为索引,并且是不可访问的。
opModePortEntry OBJECT-TYPE
SYNTAX OpModePortEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The serial port's operation mode entry."
INDEX { portIndex }
::= { opModePortTable } -- 表中数据类型 ,类似结构体定义,并且第一个是INDEX
-- 一行中,每一列的数据类型定义如下
-- INDEX如果前面定义了,就说使用前面一个表的索引,那么这里也可以省略
OpModePortEntry ::=
SEQUENCE {
portIndex
INTEGER,
portApplication
INTEGER,
portMode
INTEGER
}
-- 对索引的定义,权限不可访问,里面没有数据,所以访问也没有意义
-- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1.1.1.
-- 在一行opModePortEntry中,第一个元素
portIndex OBJECT-TYPE
SYNTAX INTEGER
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The serial port index."
::= { opModePortEntry } -- 表中一行中第二个元素的定义
-- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1.1.1.
portApplication OBJECT-TYPE
SYNTAX INTEGER {
disable(),
device-Control(),
socket(),
redundant-Com(),
drdas(),
terminal(),
reverse-Terminal(),
dial-InOut()
}
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The application of the serial port.
Note that changing this setting may also change the
operation mode."
::= { opModePortEntry } -- 1.3.6.1.4.1.8691.2.11.1.2.4.1.1.1.1.
portMode OBJECT-TYPE
SYNTAX INTEGER {
real-Com(),
slip(),
slipd(),
ppp(),
disable(),
telnetd(),
dynamic(),
tcp-Server(),
tcp-Client(),
udp(),
pppd(),
term-ASC(),
term-BIN(),
rfc-(),
redundant-Com(),
drdas-Real-Com(),
drdas-Tcp-Server(),
}
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"The operation mode of the serial port. Note that
changing this setting may also change the application."
::= { opModePortEntry } END
SNMP MIB库的更多相关文章
- SNMP学习笔记之SNMP介绍,OID及MIB库
1.1. SNMP概览 SNMP的基本知识介绍简单网络管理协议(SNMP-Simple Network Management Protocol)是一个与网络设备交互的简单方法.该规范是由IETF ...
- SNMP MIB中的含read-create节点的表的实现
做过snmp/mib开发的知道,常见的节点类型一般只有no-accessible,read-only,read-write三种访问类型.snmp V2中引入了一种新的访问类型:read-create. ...
- SNMP介绍,OID及MIB库
http://blog.sina.com.cn/s/blog_4502d59c0101fcy2.html
- lwip 2.0.2 snmp mib ipv6
1.3.6.1.2.1 - SNMP MIB-2 Submitted by Harald.T.Alvestrand at uninett.no from host aun.uninett.no (12 ...
- SNMP mib文件说明
MIB file的开始和结束 所有的MIB file的都以DEFINITIONS ::= BEGIN关键字开始,以END结束.我们所有添加的节点均应在此之间. XXX-TEST-MIB DEFINIT ...
- 使用厂商MIB库查找设备OID值 并实施监控的方法
http://chuansong.me/n/2700132 https://wenku.baidu.com/view/eeaeb1d680eb6294dd886cc7.html
- 使用厂商MIB库查找设备OID值并实施监控的方法
https://wenku.baidu.com/view/8f4b389e0029bd64783e2cd0.html
- 通过snmp监控linux
一.linux snmpd安装 yum install -y net-snmp net-snmp-utils 二.snmp的配置(vim /etc/snmp/snmpd.conf) com2sec n ...
- 天马行空-Ops平台建设概述
1 概述 什么是Ops平台,Ops平台的目标是什么,建设的考虑点有哪些?本章节以实际生活中医院的例子来进行各形象的阐述. 医院包含各种诊断治疗设备,病历库,医生.一个孕妇需要到医院 ...
随机推荐
- CNN卷积可视化与反卷积
1.<Visualizing and Understanding Convolutional Networks> 2.<Adaptive deconvolutional networ ...
- Introducing Project Kinect for Azure
https://www.linkedin.com/pulse/introducing-project-kinect-azure-alex-kipman/ Hello everyone! Microso ...
- tensorflow笔记5:tensorflow的基本运作,函数
转载:https://blog.csdn.net/lenbow/article/details/52152766 1.tensorflow的基本运作 为了快速的熟悉TensorFlow编程,下面从一段 ...
- 灯光探测器LightProbe[Unity]
灯光探测器的目的,抄手册上的话就是: Although lightmapping adds greatly to the realism of a scene, it has the disadvan ...
- 使用Maven对JAVA程序打包-带主类、带依赖【转】
很多时候,我们需要对编写的程序进行打包,这个时候,我们可以借助一些项目构建工具,如maven, sbt, ant等,这里我使用的是maven. 打包成可执行有主类的jar包(jar包中无依赖) 以下是 ...
- SpringBoot热部署配置(基于Maven)
热部署的意思是只要类中的代码被修改了,就能实时生效,而不用重启项目.spring-boot-devtools 是一个为开发者服务的一个模块,其中最重要的功能就是自动应用代码更改到最新的App上面去.原 ...
- 【Java】自动类型转换规则
自动类型转换遵循下面的规则: 若参与运算的数据类型不同,则先转换成同一类型,然后进行运算. 转换按数据长度增加的方向进行,以保证精度不降低.例如int型和long型运算时,先把int量转成long型后 ...
- rapidjson使用总结
Reference: https://blog.csdn.net/elloop/article/details/49908689 rapidjson简介 rapidjson是腾讯的开源json解析框 ...
- [转]你所不知的 CSS ::before 和 ::after 伪元素用法
SS 有两个说不上常用的伪类 :before 和 :after,偶尔会被人用来添加些自定义格式什么的,但是它们的功用不仅于此.前几天发现了 Creative Link Effects 这个非常有意思的 ...
- [转]JSP中EL表达式三元运算符的使用
原文地址:http://www.guance.com/469.html Java中的三元运算符为:条件?条件为true值:条件为false的值EL也有一样的运算符,用EL的三元运算符有时可以代替c:c ...