Super User is a question and answer site for computer enthusiasts and power users. 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

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 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. 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .