首页 \ 问答 \ 深入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 ...

相关文章

更多

最新问答

更多
  • 如何在Laravel 5.2中使用paginate与关系?(How to use paginate with relationships in Laravel 5.2?)
  • linux的常用命令干什么用的
  • 由于有四个新控制器,Auth刀片是否有任何变化?(Are there any changes in Auth blades due to four new controllers?)
  • 如何交换返回集中的行?(How to swap rows in a return set?)
  • 在ios 7中的UITableView部分周围绘制边界线(draw borderline around UITableView section in ios 7)
  • 使用Boost.Spirit Qi和Lex时的空白队长(Whitespace skipper when using Boost.Spirit Qi and Lex)
  • Java中的不可变类(Immutable class in Java)
  • WordPress发布查询(WordPress post query)
  • 如何在关系数据库中存储与IPv6兼容的地址(How to store IPv6-compatible address in a relational database)
  • 是否可以检查对象值的条件并返回密钥?(Is it possible to check the condition of a value of an object and JUST return the key?)
  • GEP分段错误LLVM C ++ API(GEP segmentation fault LLVM C++ API)
  • 绑定属性设置器未被调用(Bound Property Setter not getting Called)
  • linux ubuntu14.04版没有那个文件或目录
  • 如何使用JSF EL表达式在param中迭代变量(How to iterate over variable in param using JSF EL expression)
  • 是否有可能在WPF中的一个单独的进程中隔离一些控件?(Is it possible to isolate some controls in a separate process in WPF?)
  • 使用Python 2.7的MSI安装的默认安装目录是什么?(What is the default installation directory with an MSI install of Python 2.7?)
  • 寻求多次出现的表达式(Seeking for more than one occurrence of an expression)
  • ckeditor config.protectedSource不适用于editor.insertHtml上的html元素属性(ckeditor config.protectedSource dont work for html element attributes on editor.insertHtml)
  • linux只知道文件名,不知道在哪个目录,怎么找到文件所在目录
  • Actionscript:检查字符串是否包含域或子域(Actionscript: check if string contains domain or subdomain)
  • 将CouchDB与AJAX一起使用是否安全?(Is it safe to use CouchDB with AJAX?)
  • 懒惰地初始化AutoMapper(Lazily initializing AutoMapper)
  • 使用hasclass为多个div与一个按钮问题(using hasclass for multiple divs with one button Problems)
  • Windows Phone 7:检查资源是否存在(Windows Phone 7: Check If Resource Exists)
  • 无法在新线程中从FREContext调用getActivity()?(Can't call getActivity() from FREContext in a new thread?)
  • 在Alpine上升级到postgres96(/ usr / bin / pg_dump:没有这样的文件或目录)(Upgrade to postgres96 on Alpine (/usr/bin/pg_dump: No such file or directory))
  • 如何按部门显示报告(How to display a report by Department wise)
  • Facebook墙贴在需要访问令牌密钥后无法正常工作(Facebook wall post not working after access token key required)
  • Javascript - 如何在不擦除输入的情况下更改标签的innerText(Javascript - how to change innerText of label while not wiping out the input)
  • WooCommerce / WordPress - 不显示具有特定标题的产品(WooCommerce/WordPress - Products with specific titles are not displayed)