如何使用Eclipse启动和调试opennms

时间:2012-08-01 04:02:15

标签: opennms

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

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

谢谢, ALYA

1 个答案:

答案 0 :(得分:0)

要启动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