Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I check the server status using command prompt? I have installed opennms and it is working as expected in GUI mode. But I want to use it in a shell script and hence need a command to check a port on xyz server.

share|improve this question
Why not use nmap, or telnet, ...? – quanta Nov 28 '11 at 8:17
Already using that. But someone told checking opennms status will be more reliable! – shantanuo Nov 30 '11 at 8:11
up vote 3 down vote accepted

Your question is very unclear. Do you mean you want, from the command-line, to see the results of an OpenNMS poll? Or do you mean you want OpenNMS to perform a custom check using a script?

If the former, you can set up notifications to receive server status through email or pager, or use a text-mode browser to view a node's status. If the latter, the GpMonitor can do what you want.

Alternatively, if the test you want to do can be done in a language that BSF supports, you can use the BSFMonitor instead of the GpMonitor; it should be more performant by way of avoiding having to fork & exec.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.