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

怎样做企业的网站公司部门解散

怎样做企业的网站,公司部门解散,公众号怎么开通直播,网络营销推广方法包括有哪些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.pierceye.com/news/470634/

相关文章:

  • 三亚中国检科院生物安全中心门户网站建设什么是响应式网站
  • 为什么要建设公司网站怎么制作图片视频和配音乐
  • 建设项目环境影响登记表备案系统网站论坛门户网站开发
  • 铁岭网站建设建设云企业服务平台
  • 响应式网站制作方法泰安明航网络科技有限公司
  • 建设网站需要几级安全等保深圳网站开发招聘
  • 无锡网站建设制作公司甘肃省建设工程网站
  • 广州微信网站建设哪家好公司网站排名优化手段
  • 深圳市路桥建设集团有限公司招标采购网站crntos wordpress
  • 广告网站制作报价深圳建筑设计平台网站
  • 网站ns记录南宁企业建站模板
  • 网站服务建设目前做哪些网站能致富
  • 专业网站定制公司深圳网页制作服务
  • 白云网站(建设信科网络)网页工具在哪里
  • 食品网站策划网站建设送企业邮箱吗
  • 天津自贸区建设局网站手机网站导航设计
  • 企业网站建设制作大连网站建设吗
  • 做网页兼职网站有哪些建设网站需要花费
  • 如何快速写一个网站黄页网络的推广软件下载
  • 网站建设公司注册enfold wordpress
  • 上海网站建设百度推广公司哪家好模具厂咋做网站
  • 网站背景自动切换织梦网站模板使用教程
  • 网站建设的成果怎么写找人做淘宝网站需要多少钱
  • 网站制作 企业网站建设哪家好tiktok海外运营推广
  • 南昌做网站哪个公司好玉溪市住房和城乡建设局网站
  • 男女做暖网站是什么样子的wordpress 时间轴 主题
  • 国外建设网站jsp网站开发工具
  • 网站流量怎么赚钱wordpress 08影院模板
  • win网站建设网站哪个公司做的好
  • 温州网站运营微信公众号服务号网站开发流程