Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to check from Java code whether a Linux server (websphere) is up or not?

I use the command below (from Java with Runtime.getRuntime().exec) in order to open SSH session to my Websphere server. I want to run the ServerStatus.sh script which is located under the bin directory and return the indicator about the server status.

putty.exe -t -ssh userName@serverName -pw userPassword -P 22
share|improve this question

1 Answer 1

  1. Putty comes with command-line version, plink.exe. You can give it the command to execute on the remote end as argument and will get it's output on standard output.
  2. You can use the ssh client from openssh, probably via MSys. Unlike Windows-specific plink, this exists on all platforms.
  3. Or you can use some SSH library for Java. Some suggestions. This is probably the best option since you won't be dependent on external tools being installed.
share|improve this answer

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.