
[Protocol] SNMP
文章平均质量分 83
关于SNMP的一些知识
阿卡基-马
业余马拉松选手
展开
-
Net-SNMP snmp_api.c
static int init_snmp_init_done = 0; /* To prevent double init's. *//** * Calls the functions to do config file loading and mib module parsing * in the correct order. * * @param type label for the con...原创 2018-04-08 16:28:52 · 1025 阅读 · 0 评论 -
notificationObjs.c (修改)
/* * Note: this file originally auto-generated by mib2c using * $ */#include <net-snmp/net-snmp-config.h>#include <net-snmp/net-snmp-includes.h>#include <net-snmp/agent/net-snmp-...转载 2018-04-13 12:18:27 · 198 阅读 · 0 评论 -
odnTraps.c
/* * Note: this file originally auto-generated by mib2c using * $ */#include <net-snmp/net-snmp-config.h>#include <net-snmp/net-snmp-includes.h>#include <net-snmp/agent/net-snmp-...原创 2018-04-13 13:08:46 · 270 阅读 · 0 评论 -
sysAlarms.c (修改)
/* * Note: this file originally auto-generated by mib2c using * $ */#include <net-snmp/net-snmp-config.h>#include <net-snmp/net-snmp-includes.h>#include <net-snmp/agent/net-snmp-...转载 2018-04-13 13:11:14 · 314 阅读 · 0 评论 -
[net-snmp] var_struct.h
#ifndef VAR_STRUCT_H#define VAR_STRUCT_H/* * The subtree structure contains a subtree prefix which applies to * all variables in the associated variable list. * * By converting to a tree of subtree st...原创 2018-04-14 08:27:02 · 368 阅读 · 0 评论 -
agent_trap.c
/** * This function allows you to make a distinction between generic * traps from different classes of equipment. For example, you may want * to handle a SNMP_TRAP_LINKDOWN trap for a particular dev...原创 2018-04-14 09:06:39 · 767 阅读 · 0 评论 -
对net-snmp中netsnmp_variable_list的理解
原文地址:点击打开链接文档参见:http://www.net-snmp.org/dev/agent/structvariable__list.htmlsnmp_variable_list是variable_list的typedef其实snmp_variable_list相当于是snmp_variable_list类型链表的某一个元素,而不是整个链表。它里面放了一个snmp变量的相关信息。snmp_...转载 2018-07-03 14:26:36 · 2103 阅读 · 0 评论 -
【Imp!!!】【转】snmp agent 表格实现(子代理方式实现)
原文地址:点击打开链接前奏参见如下:http://blog.sina.com.cn/s/blog_8f3de3250100xhao.htmlhttp://blog.youkuaiyun.com/hepeng597/article/details/8782868http://blog.youkuaiyun.com/rheostat/article/details/8172580问题解决:http:/...转载 2018-07-03 19:01:16 · 551 阅读 · 0 评论 -
Net-SNMP 表格
/** returns the first data point within the portSetTable table data. Set the my_loop_context variable to the first data point structure of your choice (from which you can find the next one). Th...原创 2018-07-04 10:32:48 · 715 阅读 · 0 评论 -
【Netsnmp】sendtrap.c
/* CpqArray Deamon, a program to monitor and remotely configure a SmartArray controller. Copyright (C) 1999-2003 Hugo Trippaers This program is free software; you can redistribute it a...原创 2018-08-22 10:38:45 · 649 阅读 · 0 评论 -
【Imp!!!】SNMP 的table
设计MIB文件mytableTest-MIB.txt: myTestTable DEFINITIONS ::= BEGIN IMPORTS OBJECT-GROUP, MODULE-COMPLIANCE, NOTIFICATION-GROUP FROM SNMPv2-CONF enterprises, Integer32, Unsigned32, O...转载 2018-08-22 15:05:32 · 615 阅读 · 0 评论 -
【NetSNMP##】 C语言发送SNMP Trap消息
项目需求系统利用SNMP Trap消息上报状态给NMS,考虑使用net-snmp提供的SNMP库函数实现该功能,且需要根据不同端口使用不同的session。1)头文件为了使用 netsnmp 的 API,必须 include 以下这些头文件:#include <net-snmp/net-snmp-config.h>#include <net-snmp/net-s...转载 2018-08-17 09:11:31 · 2897 阅读 · 1 评论 -
snmp timstamp字段及获取函数
SNMP协议中,timestamp是指数据端服务器发送该条数据时,距离系统上次初始化的时间。这个单位应该是10ms,发现有的软件处理这个不是很标准。使用的是net-snmp库,里面的使用的get_uptime 正是一个返回了10ms的函数: 00569 long 00570 get_uptime(void) 00571 { 00572 long ...转载 2019-01-20 15:09:06 · 818 阅读 · 0 评论 -
sysAlarms.c (未修改)
/* * Note: this file originally auto-generated by mib2c using * $ */#include <net-snmp/net-snmp-config.h>#include <net-snmp/net-snmp-includes.h>#include <net-snmp/agent/net-snmp-...原创 2018-04-13 11:10:44 · 296 阅读 · 0 评论 -
class AbstractTransportDispatcher(object):
class AbstractTransportDispatcher(object): def __init__(self): self.__transports = {} self.__transportDomainMap = {} self.__jobs = {} self.__recvCallables = {} se...原创 2018-04-17 22:55:35 · 282 阅读 · 0 评论 -
net-snmp代理开发之表格开发入门
Net-SNMP代理开发之表格开发入门net-snmp开发比较难以理解的是表格的实现方式,本文,笔者尝试一个人的理解,用简单的方式解释net-snmp的开发。并通过示例来说明如何开发表格。Net-SNMP表格的理解现实中的表格如下图所示,有多行,多列,有唯一确定某一行的索引列,可以是固定的一列,也可以是多列共同决定某行。在Net-SNMP中,表格的标识方法如下图所示:上图定义了表的类型,每一个表有...转载 2018-04-12 10:31:01 · 1060 阅读 · 0 评论 -
net-snmp-config --compile-subagent entityPhysical entityPhysical.c
/* generated from net-snmp-config */#include <net-snmp/net-snmp-config.h>#ifdef HAVE_SIGNAL#include <signal.h>#endif /* HAVE_SIGNAL */#include <net-snmp/net-snmp-includes.h>#include ...原创 2018-04-09 09:14:02 · 424 阅读 · 0 评论 -
snmptranslate -h
[root@localhost lucc]# snmptranslate -hUSAGE: snmptranslate [OPTIONS] OID [OID]... Version: 5.7.3 Web: http://www.net-snmp.org/ Email: net-snmp-coders@lists.sourceforge.netOPTIONS: -h ...原创 2018-04-09 14:41:27 · 1430 阅读 · 0 评论 -
entityPhysical_access.c
/* * Note: this file originally auto-generated by mib2c using * $ */#include <net-snmp/net-snmp-config.h>#include <net-snmp/net-snmp-includes.h>#include <net-snmp/agent/net-snmp-...原创 2018-04-09 17:28:50 · 407 阅读 · 0 评论 -
在Win7_CentOS虚拟机上实现python-netsnmp扩展
大二菜鸟暑期实习,要实现对某设备的监控,需要用到snmp,此前对python、snmp甚至linux一窍不通,通过近两周的学习差不多入门,在此做下笔记,供以后参考,也希望能得到指正。 公司的这台电脑连不了外网,前期需要的所有东西除了共享全部靠U盘搬运。后面在CentOS上搭建环境时遇到缺少各种东西问题也无法通过yum等命令解决,所有的安装都是源码编译安装,所以非常但藤。 ...转载 2018-04-16 09:43:47 · 431 阅读 · 0 评论 -
Net-SNMP parameter.c
/* * Note: this file originally auto-generated by mib2c using * $ */#include <net-snmp/net-snmp-config.h>#include <net-snmp/net-snmp-includes.h>#include <net-snmp/agent/net-snmp-...转载 2018-04-11 10:50:09 · 369 阅读 · 0 评论 -
用PYTHON捕获SNMP TRAP
接触到pysnmp是因为项目中需要捕获一硬件设备发出来的snmp trap,并针对不同的event trap作出反应(声音告警、执行一些命令)。pysnmp是“SNMP framework for Python”,可以让我们在Python的环境下捕获snmp trap,还有snmpset,snmpwalk,snmpget等。pysnmp和pysnmp-apps的安装pysnmp的安装就是解压出来的...转载 2018-04-17 09:11:41 · 6198 阅读 · 1 评论 -
Python Tutorial: Get data from a Dell PowerEdge Server using pysnmp
This python tutorial will teach you how to query the Dell PowerEdge temperature sensors via SNMP. Once OpenManage software is installed on a Dell server, a ton of information is made available via SNM...转载 2018-04-17 10:33:24 · 380 阅读 · 0 评论 -
[Imp] 基于net-snmp的代理agent开发详解
转载请标明出处 原文地址:http://blog.youkuaiyun.com/hepeng597/article/details/8782868 花了一两天时间测试和整理一下。用net-snmp扩展MIB库,实现方法可归结为四种:1)一是静态库方式,通过修改配置头文件,在相应地方包含新引入的mib模块的.c和.h文件,然后重新编译库文件和扩展代码;这种方式不够灵活,每次修改扩展的MIB后,都...转载 2018-04-02 11:37:50 · 963 阅读 · 0 评论 -
TUT:Writing a Subagent
First off, you need to write a mib module first before you can do this part of the tutorial. We assume you have read and completed the mib module portion of the toolkit tutorial. The AgentX library su...原创 2018-04-04 14:21:01 · 230 阅读 · 0 评论 -
net-snmp-config
[root@localhost local]# net-snmp-configUsage: net-snmp-config [--cflags] [--agent-libs] [--libs] [--version] ... [see below for complete flag list] --version displays the ...原创 2018-04-04 15:50:11 · 2611 阅读 · 0 评论 -
net-snmp-config --compile-subagent 案例分析
[root@localhost update]# net-snmp-config --compile-subagent updateTable updateTable.c updateTable_access.c updateTable_checkfns.c updateTable_checkfns_local.cgenerating the temporary code file: netsnm...原创 2018-04-12 10:10:13 · 741 阅读 · 0 评论 -
updateTable_access.c
/* * Note: this file originally auto-generated by mib2c using * $ */#include <net-snmp/net-snmp-config.h>#include <net-snmp/net-snmp-includes.h>#include <net-snmp/agent/net-snmp-...原创 2018-04-12 10:16:37 · 287 阅读 · 0 评论 -
NetSNMP -- get_uptime
/** * Returns the system uptime in centiseconds. * * @note The value returned by this function is not identical to sysUpTime * defined in RFC 1213. get_uptime() returns the system uptime while...转载 2019-01-20 15:44:44 · 742 阅读 · 0 评论