我是opennms的新手。我正在開發EMS。 我的團隊計劃從當前的EMS轉向opennms。 我成功使用Eclipse進行配置,但不知道如何從Eclipse啓動opennms和調試。如何使用Eclipse啓動和調試opennms
實際上,我已經成功地使用命令/compile.sh和assemble.sh進行編譯和組裝,但我需要知道如何使用Eclipse調試,編譯和啓動opennms。
感謝, ALYA
我是opennms的新手。我正在開發EMS。 我的團隊計劃從當前的EMS轉向opennms。 我成功使用Eclipse進行配置,但不知道如何從Eclipse啓動opennms和調試。如何使用Eclipse啓動和調試opennms
實際上,我已經成功地使用命令/compile.sh和assemble.sh進行編譯和組裝,但我需要知道如何使用Eclipse調試,編譯和啓動opennms。
感謝, ALYA
要啓動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腳本」 的例子
sudo ./opennms start
sudo ./opennms -vt start
sudo ./opennms -v start
sudo ./opennms stop
假設你是在文件夾${opennms.home}/bin