Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.