I am trying to write a program that will monitor my routers and servers and notify me when they go down. I am looking for a way to ping the host and read the reply. The InetAddress.isReachable method is the only thing i could find but it uses the echo port which windows has it off by default. i am looking for something generic that i can use on diffrent platforms. Windows, Linux, Cisco OS.
mrjoli021
-3
Junior Poster
Recommended Answers
Jump to PostTake a look at the Runtime class. You can use its exec method to run a ping and the resulting Process has methods to allow you to obtain the I/O/E streams. This allows you to interpret the results of your ping, but note that there are differences in the ping …
Jump to PostHello, mrjoli021
I hope the Sun description of Runtime class help you:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
All 5 Replies
darkagn
315
Veteran Poster
Featured Poster
mrjoli021
-3
Junior Poster
Antenka
274
Posting Whiz
darkagn
315
Veteran Poster
Featured Poster
darkagn
315
Veteran Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.