1

我是opennms的新手。我正在从事EMS开发。我的团队计划从当前的 EMS 迁移到 opennms。我使用 Eclipse 成功配置了它,但不知道如何从 Eclipse 启动 opennms 和调试。

实际上,我已经使用命令 /compile.sh 和 assemble.sh 成功编译和组装,但我需要知道如何使用 Eclipse 调试、编译和启动 opennms。

谢谢,阿利亚

4

1 回答 1

1

要启动 OpenNMS,您必须使用“opennms 脚本”。这位于${opennms.home}/bin

使用该脚本,您可以告诉 OpenNMS 在调试模式下运行,如下所示: sudo ./opennms -t start

OpenNMS 然后告诉您远程调试器端口是什么(默认为:8001)。

然后在eclipse中你可以“远程调试”OpenNMS。如何做到这一点,您可以按照此说明进行操作(http://javarevisited.blogspot.de/2011/02/how-to-setup-remote-debugging-in.html

我通常以详细和调试模式启动 opennms:sudo ./opennms -vt start

opennms 使用

Usage: ./opennms [-n] [-t] [-p] [-o] [-c timeout] [-v] [-Q] <command> [<service>]

command options: start|stop|restart|status|check|pause|resume|kill
service options: all|<a service id from the etc/service-configuration.xml>
defaults to all

The following options are available:

  -n  "No execute" mode.  Don't call Java to do anything.
  -t  Test mode.  Enable JPDA on port 8001.
  -p  Enable TIJMP profiling
  -o  Enable OProfile profiling
  -c  Controller HTTP connection timeout in seconds.
  -v  Verbose mode.  When used with the "status" command, gives the
      results for all OpenNMS services.  When used with "start", enables
      some verbose debugging, such as details on garbage collection.
  -Q  Quick mode.  Don't wait for OpenNMS to startup.  Useful if you
      want to watch the logs while OpenNMS starts up without wanting to
      open another terminal window.

“opennnms 脚本”示例

  • 要启动 opennms:sudo ./opennms start
  • 以详细模式启动 opennms:sudo ./opennms -v start
  • 以详细和调试模式启动 opennms:sudo ./opennms -vt start
  • 要停止 opennms:sudo ./opennms stop

假设你在文件夹中${opennms.home}/bin

于 2013-08-21T10:01:03.170 回答