首页 \ 问答 \ 深入java虚拟机 绝版和深入理解Java虚拟机:JVM高级特性与最佳实践 周志明

深入java虚拟机 绝版和深入理解Java虚拟机:JVM高级特性与最佳实践 周志明

哪个写得比较好?想找本JVM的书籍,或者其他推荐 最好是国外的
更新时间:2023-08-25 18:08

最满意答案

snmptrapd需要一个配置文档,snmptrapd.conf。
此文件用来指定管理进程如何处理接收到的snmp notification。
1. 在net-snmp安装目录下新建snmptrapd.conf文件,假设本系统使用以下路径:/ABC/soft/net-snmp/share/snmp/snmptrapd.conf

2. 在snmptrapd.conf中加入以下指令:
authCommunity log,execute,net public
这条指令指明以“public”为“community”请求的snmp “notification”允许的操作。
各变量意义如下:
log: log the details of the notification - either in a  specified file, to standard output (or stderr), or via syslog(or similar).
execute: pass the details of the trap to a specified handler program, including embedded perl.
net: forward the trap to another notification receiver.

3. 若想对接收到的信息进行处理,可以使用traphandle,示例如下:
traphandle SNMPv2-MIB::coldStart    /usr/nba/bin/traps cold
traphandle SNMPv2-MIB::warmStart    /usr/nba/bin/traps warm
traphandle IF-MIB::linkDown         /usr/nba/bin/traps down
traphandle IF-MIB::linkUp           /usr/nba/bin/traps up
第一个参数为从snmptrapd接收的OID,第二个参数为调用的程序。此系统未做traphandle处理。

4. 启动snmptrapd
使用以下指令启动snmptrapd:
snmptrapd -f -Lo
该指令将接收到的信息通过标准输出设备打印出来,各参数意义如下:
-f: Do not fork() from the calling shell.
-L[efos]: Specify where logging output should be directed (standard error or output, to a file or via syslog

相关问答

更多
  • 1、具体实现可参考开源snmp代码 snmp4j:http://www.snmp4j.org/ 里面有具体实现方法,网上相关介绍也有不少。 2、如果仅仅是配置客户端trap,有很多小工具安装配置一下就可以,如net-snmp(网上相关资料也不少) 3、代理端是需要开一个线程监听客户端trap消息的
  • 人生在世,实在有许多需要珍惜的东西,但人们往往拥有的时候不懂得珍惜,在失去之后,才会想到珍惜二字,但已为时已晚。。在生活中我们经常听到这样的话,“如果让我回到从前,我会……”“如果以前那次我抓住了机会,我就……”也许,我们每一个人都曾经说过同样的如果和作过同样的假设,但是,人生是不能重来的,因为人生没有如果,命运也不相信假设,因为有了因为,所以有了所以,既然已成既然,何必再说何必?学会珍惜,珍惜亲情。。亲情,是在一个人还没有来到这个世界前就先期而至,并时刻伴随渡过慢慢人生征程。。从小到大,父母、兄弟、姐妹、 ...
  • 对于那些面临同样问题的人,我可以按照以下教程来解决它: for those who face the same problem, I solve it by following this tutorial :
  • 你可以尝试这样的事情: while [ 1 ]; do sleep 1 IS_UP=$(ip a | grep "IFACE:" | grep "state UP") ...
  • 我找到了答案。 问题出在执行snmptrapd的服务器上。 我简单地将参数-n传递给snmptrapd并解决了所有问题! I found the answer. The problem was in the server who executes snmptrapd. Simply I passed the argument -n to the snmptrapd and that solved all!.
  • 有关详细信息,我使用NET-SNMP工具解决了我的问题。 我做的是: 下载net-snmp二进制文件 确保mib位于默认文件夹中(请参阅自述文件) 试试snmpwalk: snmpwalk -v2c -c [READ_COMMUNITY] 127.0.0.1 targetaddrtable SNMP-TARGET-MIB :: snmpTargetAddrTDomain.'test'= OID:SNMPv2-TM :: snmpUDPDomain SNMP-TARGET-MIB :: snmpTargetA ...
  • 问题是你在TrapReceiver构造函数中调用listen() ,它发生在gui线程上。 你只想在run()方法中调用listen() ,因为这是在新线程中发生的部分。 the problem is that you are calling listen() in the TrapReceiver constructor, which happens on the gui thread. you only want to call listen() in the run() method, as that ...
  • 在纯粹的技术层面上,您可以将任何OID用于任何目的。 但是,SNMP被设计为委员会管理的协议。 如果您的陷阱或其varbinds不符合标准消息/类型,则您的OID应以1.3.6.1.4.1.YOUR_ENTERPRISE_NUMBER开头。 如果您的公司或您的客户没有注册的私人企业号码(PEN),您可以免费向IANA申请一个 。 如果有人管理您的PEN,您应该要求他们为您的产品域提供OID。 PEN列表中包含个人的电子邮件地址。 在该系统中存在行业级信任的要素。 与控制竞争对手企业编号的人合作并不罕见。 如 ...
  • 没有提供Net-SNMP API。 我们可以通过fork-exec Net-SNMP命令发送陷阱。 There is no Net-SNMP API provided. We can just fork-exec Net-SNMP command to send trap.
  • 似乎PHP中没有直接的方法来发送SNMP陷阱,答案也是如此。 所以最后我想出了自己的方式,依靠Net-Snmp本身。 我真正想要的是从php程序发送Snmp陷阱。 我终于通过Linux终端在Net-Snmp库的帮助下完成了这项工作。 以下是步骤。 安装Net-Snmp:有两种方法可以在linux机器上安装net-Snmp软件包 1)通过http://www.net-snmp.org/wiki/index.php/Net-Snmp_on_Ubuntu中提到的从sourceforge.net下载Net-Snmp ...

相关文章

更多

最新问答

更多
  • python的访问器方法有哪些
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。
  • 响应navi重叠h1和nav上的h1链接不起作用(Responsive navi overlaps h1 and navi links on h1 isn't working)
  • 在C中读取文件:“r”和“a +”标志的不同行为(Reading a File in C: different behavior for “r” and “a+” flags)
  • NFC提供什么样的带宽?(What Kind of Bandwidth does NFC Provide?)
  • 元素上的盒子阴影行为(box-shadow behaviour on elements)
  • Laravel检查是否存在记录(Laravel Checking If a Record Exists)
  • 设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)
  • 想学Linux 运维 深圳有哪个培训机构好一点
  • 为什么有时不需要在lambda中捕获一个常量变量?(Why is a const variable sometimes not required to be captured in a lambda?)
  • 在Framework 3.5中使用服务器标签<%=%>设置Visible属性(Set Visible property with server tag <%= %> in Framework 3.5)
  • AdoNetAppender中的log4net连接类型无效(log4net connection type invalid in AdoNetAppender)
  • 错误:发送后无法设置标题。(Error: Can't set headers after they are sent. authentication system)
  • 等待EC2实例重启(Wait for an EC2 instance to reboot)
  • 如何在红宝石中使用正则表达式?(How to do this in regex in ruby?)
  • 使用鼠标在OpenGL GLUT中绘制多边形(Draw a polygon in OpenGL GLUT with mouse)
  • 江民杀毒软件的KSysnon.sys模块是什么东西?
  • 处理器在传递到add_xpath()或add_value()时调用了什么顺序?(What order are processors called when passed into add_xpath() or add_value()?)
  • sp_updatestats是否导致SQL Server 2005中无法访问表?(Does sp_updatestats cause tables to be inaccessible in SQL Server 2005?)
  • 如何创建一个可以与持续运行的服务交互的CLI,类似于MySQL的shell?(How to create a CLI that can interact with a continuously running service, similar to MySQL's shell?)
  • AESGCM解密失败的MAC(AESGCM decryption failing with MAC)
  • SQL查询,其中字段不包含$ x(SQL Query Where Field DOES NOT Contain $x)
  • PerSession与PerCall(PerSession vs. PerCall)
  • C#:有两个构造函数的对象:如何限制哪些属性设置在一起?(C#: Object having two constructors: how to limit which properties are set together?)
  • 平衡一个精灵(Balancing a sprite)
  • n2cms Asp.net在“文件”菜单上给出错误(文件管理器)(n2cms Asp.net give error on Files menu (File Manager))
  • Zurb Foundation 4 - 嵌套网格对齐问题(Zurb Foundation 4 - Nested grid alignment issues)
  • 湖北京山哪里有修平板计算机的