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平台的目标是什么,建设的考虑点有哪些?本章节以实际生活中医院的例子来进行各形象的阐述. 医院包含各种诊断治疗设备,病历库,医生.一个孕妇需要到医院 ...
随机推荐
- yum rpm 命令一运行就卡住 只有kill 掉
由于rpm的数据库出现异常导至直接卡死,造成这种异常是因为之前不正常的安装或查询. 解决方法: # rm -f /var/lib/rpm/__db.00* #删除rpm数据文件 # rpm --reb ...
- 【小白的CFD之旅】21 网格划分软件的选择
但是怎样才能获得流体计算网格呢?“工欲善其事必先利其器”,画网格该用什么器呢?小白决定找黄师姐请教一番. 小白找到黄师姐的时候,黄师姐正在电脑上忙着. “黄师姐,我发现网格划分软件有好多种,究竟哪种才 ...
- 数据库的ACID
一.事务 定义:所谓事务,它是一个操作序列,这些操作要么都执行,要么都不执行,它是一个不可分割的工作单位. 准备工作:为了说明事务的ACID原理,我们使用银行账户及资金管理的案例进行分析. [sql] ...
- iOS开发transform的使用
// // ViewController.m // 18-transform的使用 #import "ViewController.h" @interface ViewCont ...
- Redis面试题及分布式集群
Reference: http://blog.csdn.net/yajlv/article/details/73467865 1. 使用Redis有哪些好处? (1) 速度快,因为数据存在内存中,类似 ...
- Linux考前突击
### 试题 --- http://blog.51cto.com/12612579/2056140 ### 涉及到的知识点 --- Linux之通配符https://www.cnblogs.com/0 ...
- Yum Priorities
简介 Linux 发行版比较多,同时还有很多个人或组织维护了某些特定用途的安装/升级源.Yum Priorities 插件可以用来强制保护源.它通过给各个源设定不同的优先级,使得系统管理员可以将某些源 ...
- zmap blacklist
# From IANA IPv4 Special-Purpose Address Registry# http://www.iana.org/assignments/iana-ipv4-special ...
- HDFS只支持文件append操作, 而依赖HDFS的HBase如何完成增删改查功能
其实HBase/LevelDB等系统,背后都应用了Log-structured merge tree.HBase的写操作有两个步骤:1) 写入HLog(防止宕机丢失数据), 2) 写入对应的Memst ...
- C++11中如何输出enum class的值
Unlike an unscoped enumeration, a scoped enumeration is not implicitly convertible to its integer va ...