当前位置: 首页 > news >正文

joomla 网站模版一个app多少钱

joomla 网站模版,一个app多少钱,jsp系统网站建设带源代码,免费直播app软件下载Net-snmp:接收Trap的apiNet-snmp:接收Trap的apinet-snmp使用的是snmptrapd来接收trap#xff0c;我想自己写程序接收trap#xff0c;也看了snmptrapd.c代码#xff0c;很繁琐。有没有更简单一点的例子。net-snmp作为管理端功能有点欠缺#xff0c;可以使用snmp毕业论文-- B…Net-snmp:接收Trap的apiNet-snmp:接收Trap的apinet-snmp使用的是snmptrapd来接收trap我想自己写程序接收trap也看了snmptrapd.c代码很繁琐。有没有更简单一点的例子。net-snmp作为管理端功能有点欠缺可以使用snmp毕业论文-- BRD-SYS-MIB.my -- MIB generated by MG-SOFT Visual MIB Builder Version 6.0  Build 88 -- Monday, July 11, 2011 at 17:14:41 --       BRD-SYS-MIB DEFINITIONS :: BEGIN            IMPORTS             OBJECT-GROUP, NOTIFICATION-GROUP                             FROM SNMPv2-CONF                         enterprises, OBJECT-TYPE, MODULE-IDENTITY, OBJECT-IDENTITY, NOTIFICATION-TYPE                             FROM SNMPv2-SMI;                     -- 1.3.6.1.4.1.30000.1         brdModule MODULE-IDENTITY              LAST-UPDATED 201007061242Z        -- July 06, 2010 at 12:42 GMT             ORGANIZATION                  Organization.             CONTACT-INFO                  Contact-info.             DESCRIPTION                  Description.             :: { broadtech 1 }                   -- -- Node definitions --               -- 1.3.6.1.4.1.30000         broadtech OBJECT-IDENTITY             STATUS current             DESCRIPTION                  The root of the OID sub-tree assigned to Company by the Internet Assigned Numbers Authority (IANA)             :: { enterprises 30000 }                     -- 1.3.6.1.4.1.30000.1.1         system OBJECT IDENTIFIER :: { brdModule 1 }                     -- 1.3.6.1.4.1.30000.1.1.1         realvalue OBJECT IDENTIFIER :: { system 1 }                     -- 1.3.6.1.4.1.30000.1.1.1.1         cpu OBJECT-TYPE             SYNTAX INTEGER (0..100)             MAX-ACCESS read-only             STATUS current             DESCRIPTION                 Description.             :: { realvalue 1 }                     -- 1.3.6.1.4.1.30000.1.1.1.2         maxcpu OBJECT-TYPE             SYNTAX INTEGER (50..100)             MAX-ACCESS read-write             STATUS current             DESCRIPTION                 Description.             :: { realvalue 2 }                     -- 1.3.6.1.4.1.30000.1.1.1.3         notifycpu NOTIFICATION-TYPE             OBJECTS { cpu }             STATUS current             DESCRIPTION                  Description.             :: { realvalue 3 }                     -- 1.3.6.1.4.1.30000.1.1.1.4         realgroup OBJECT-GROUP             OBJECTS { cpu, maxcpu }             STATUS current             DESCRIPTION                  Description.             :: { realvalue 4 }                     -- 1.3.6.1.4.1.30000.1.1.1.5         notifygroup NOTIFICATION-GROUP             NOTIFICATIONS { notifycpu }             STATUS current             DESCRIPTION                  Description.             :: { realvalue 5 }                       END ----brdModule(1) --   | --   --system(1) --      | --      --realvalue(1) --         | --         -- -R-- INTEGER   cpu(1) --         |        Range: 0..100 --         -- -RW- INTEGER   maxcpu(2) --         |        Range: 50..100 --         --notifycpu(3) --         --realgroup(4) --         --notifygroup(5) -- -- BRD-SYS-MIB.my --asn.1用的mgMibBrowser生成的。头文件C/C code?1234567891011121314151617 /*  * Note: this file originally auto-generated by mib2c using  *        : mib2c.int_watch.conf 17587 2009-04-30 06:57:27Z magfr $  */#ifndef BRDMODULE_H #define BRDMODULE_H     /*  * function declarations   */void            init_brdModule(void); int             send_notifycpu_trap(void); void        updateValueOfCpu(unsigned int clientreg, void *clientarg);   #endif                          /* BRDMODULE_H */下面是C代码C/C code?/*  * Note: this file originally auto-generated by mib2c using  *        : mib2c.int_watch.conf 17587 2009-04-30 06:57:27Z magfr $  */  #include #include #include #include brdModule.h #include getcpu.h       //for get cpu rate   /*  * The variables we want to tie the relevant OIDs to.  * The agent will handle all GET and (if applicable) SET requests  * to these variables automatically, changing the values as needed.  */  long            cpu 0;        /* XXX: set default value */long            maxcpu 0;     /* XXX: set default value */      static const oid snmptrap_oid[] { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0 };   int     //mib2c auto make and modifyed send_notifycpu_trap(void) {     netsnmp_variable_list *var_list NULL;     const oid       notifycpu_oid[]          { 1, 3, 6, 1, 4, 1, 30000, 1, 1, 1, 3 };     const oid       cpu_oid[] { 1, 3, 6, 1, 4, 1, 30000, 1, 1, 1, 1, 0 };       /*      * Set the snmpTrapOid.0 value      */    snmp_varlist_add_variable(var_list,                               snmptrap_oid, OID_LENGTH(snmptrap_oid),                               ASN_OBJECT_ID,                               notifycpu_oid, sizeof(notifycpu_oid));       /*      * Add any objects from the trap definition      */    snmp_varlist_add_variable(var_list,                               cpu_oid, OID_LENGTH(cpu_oid), ASN_INTEGER,                               /*                                * Set an appropriate value for cpu                                 */                              (long*)cpu, sizeof(cpu));  //modifyed by ligang       /*      * Add any extra (optional) objects here      */      /*      * Send the trap to the list of configured destinations      *  and clean up      */    send_v2trap(var_list);     snmp_free_varbind(var_list);       return SNMP_ERR_NOERROR; }     /*  * Our initialization routine, called automatically by the agent   * (Note that the function name must match init_FILENAME())   */void   //mib2c auto make and modifyed init_brdModule(void) {     netsnmp_handler_registration *reg;       const oid       cpu_oid[] { 1, 3, 6, 1, 4, 1, 30000, 1, 1, 1, 1 };     static netsnmp_watcher_info cpu_winfo;     const oid       maxcpu_oid[] { 1, 3, 6, 1, 4, 1, 30000, 1, 1, 1, 2 };     static netsnmp_watcher_info maxcpu_winfo;       /*      * a debugging statement.  Run the agent with -DbrdModule to see      * the output of this debugging statement.       */    DEBUGMSGTL((brdModule, Initializing the brdModule module\n));         /*      * Register scalar watchers for each of the MIB objects.      * The ASN type and RO/RW status are taken from the MIB definition,      * but can be adjusted if needed.      *      * In most circumstances, the scalar watcher will handle all      * of the necessary processing.  But the NULL parameter in the      * netsnmp_create_handler_registration() call can be used to      * supply a user-provided handler if necessary.      *      * This approach can also be used to handle Counter64, string-      * and OID-based watched scalars (although variable-sized writeable      * objects will need some more specialised initialisation).      */    DEBUGMSGTL((brdModule,                 Initializing cpu scalar integer.  Default value %d\n,                 cpu));     reg netsnmp_create_handler_registration(cpu, NULL,                                               cpu_oid, OID_LENGTH(cpu_oid),                                               HANDLER_CAN_RONLY);     netsnmp_init_watcher_info(cpu_winfo, cpu, sizeof(long),                               ASN_INTEGER, WATCHER_FIXED_SIZE);     if (netsnmp_register_watched_scalar(reg, cpu_winfo) 0) {         snmp_log(LOG_ERR, Failed to register watched cpu);     }       DEBUGMSGTL((brdModule,                 Initializing maxcpu scalar integer.  Default value %d\n,                 maxcpu));     reg netsnmp_create_handler_registration(maxcpu, NULL,                                               maxcpu_oid,                                               OID_LENGTH(maxcpu_oid),                                               HANDLER_CAN_RWRITE);     netsnmp_init_watcher_info(maxcpu_winfo, maxcpu, sizeof(long),                               ASN_INTEGER, WATCHER_FIXED_SIZE);     if (netsnmp_register_watched_scalar(reg, maxcpu_winfo) 0) {         snmp_log(LOG_ERR, Failed to register watched maxcpu);     }         DEBUGMSGTL((brdModule, Done initalizing brdModule module\n));     /*add a timer 3s:HANDLE FUNCTION IS updateValueOfCpu WITHOUT ARGS*/    snmp_alarm_register(3,SA_REPEAT,updateValueOfCpu,NULL); } /*timer handle function*/void updateValueOfCpu(unsigned int clientreg, void *clientarg) {     cpugetcpurate(NULL);     printf(%d %d\n,cpu,maxcpu);     if(cpumaxcpu)//all oids value in memery        send_notifycpu_trap();//send trap     return; }MakefileC/C code?# # Warning: you may need more libraries than are included here on the # build line.  The agent frequently needs various libraries in order # to compile pieces of it, but is OS dependent and we cant list all # the combinations here.  Instead, look at the libraries that were # used when linking the snmpd master agent and copy those to this # file. #   CCgcc   OBJS1snmpdemoapp.o OBJS2example-demon.o nstAgentSubagentObject.o OBJS3asyncapp.o TARGETSexample-demon snmpdemoapp asyncapp   CFLAGS-I. net-snmp-config --cflags BUILDLIBSnet-snmp-config --libs BUILDAGENTLIBSnet-snmp-config --agent-libs   # shared library flags (assumes gcc) DLFLAGS-fPIC -shared   all: $(TARGETS)   snmpdemoapp: $(OBJS1)     $(CC) -o snmpdemoapp $(OBJS1) $(BUILDLIBS)   asyncapp: $(OBJS3)     $(CC) -o asyncapp $(OBJS3) $(BUILDLIBS)   example-demon: $(OBJS2)     $(CC) -o example-demon $(OBJS2)  $(BUILDAGENTLIBS)   clean:     rm $(OBJS2) $(OBJS2) $(TARGETS) brdModule.so: brdModule.c Makefile     $(CC) $(CFLAGS) $(DLFLAGS) -c -o brdModule.o brdModule.c     $(CC) $(CFLAGS) $(DLFLAGS) -c -o getcpu.o getcpu.c     $(CC) $(CFLAGS) $(DLFLAGS) -o brdModule.so brdModule.o getcpu.o配置文件有点复杂就不贴了。采用动态库方式运行需要完整程序、配置的 PM
http://www.zqtcl.cn/news/315484/

相关文章:

  • 如何搭建一个完整的网站wordpress 小程序开发
  • 外贸网站建设关键点为网站网站做代理被判缓刑
  • 网站免费正能量小说台州百度关键词优化
  • 保定自助建站做静态网站
  • 旅游网站对比模板免费招收手游代理
  • phpstudy网站建设教程wordpress破解管理员帐号
  • 商务网站规划与建设心得北京小程序制作首选华网天下
  • 果洛电子商务网站建设多少钱公司网站建设选什么服务器
  • 莱芜做网站公司网站建设表单教案
  • 建设酒类产品网站的好处遵义网站制作费用
  • 高端网站设计价格wordpress登录下载附件
  • 国内有名的网站设计公司wordpress缓存插件比拼
  • 网站的建设和推广直播营销策划方案范文
  • 做购物平台网站 民治百度导航地图下载
  • 东莞市主营网站建设服务机构青岛建站公司电话
  • 做网站技术wordpress漂亮手机网站模板下载
  • 网站怎么更新网页内容网络推广怎么找客户
  • 如何编写网站建设销售的心得适合装饰公司的名字
  • 有什么免费建网站网站pr查询
  • flash+xml网站模板简述网站制作的一般流程
  • 成都私人做网站建设怎么切页面做网站
  • 聊城做网站的公司论坛外链代发
  • 廊坊企业自助建站网站框架设计好后怎么做
  • 手机网站建设效果wordpress 目录改变
  • 做商城网站的项目背景图片c2750服务器做网站行吗
  • 北京市专业网站建设wordpress视频站
  • 知名网站制作公南充建设机械网站
  • 网站建设实践鉴定微商小程序制作
  • 盗用别人网站图做网站快速排名优化推广手机
  • 安徽网站建设服务平台wordpress自定义统计