Menu

#8 check-ping not doing a real ping

open
5
2007-03-07
2007-03-06
Anonymous
No

check-ping does a InetAddress.isReachable. As far as I know (did some test), doing a real ping is something Java cannot do (for permission reasons?).

Due to this, the check-ping takes at least 1000ms for doing a ping which results in RTA values above 1000ms whereas the real ping has 1ms RTA in the case I tested.

From the readings I did on the internet, the only way to do a real ping in Java is to execute the OS's ping command via the exec() method in Java.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I did the test with Java 1.5.0_10 and Java 1.6.0 on Windows XP SP2 and with Java 1.6.0 on Vista.

     
  • Anonymous

    Anonymous - 2007-03-07

    Logged In: YES
    user_id=1464385
    Originator: NO

    If you run the plugin as root on linux this works just fine.
    On windows this is not a problem.
    I have found NO way around this on linux using a java plugin for ping.
    You must instead use either the existing nagios check_ping plugin ( which can ALREADY work with Blue ).
    OR... there is a JNI way to accomplish this, and I will look at offering such a mechanism shortly.

    Rich

     
  • Anonymous

    Anonymous - 2007-03-07

    Logged In: YES
    user_id=1464385
    Originator: NO

    Oops. just realized this was tested on windows...
    Checking into it.

     
  • Anonymous

    Anonymous - 2007-03-07
    • assigned_to: nobody --> akuns
    • status: open --> closed
     
  • Anonymous

    Anonymous - 2007-03-07
    • status: closed --> open
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.