2 Replies Latest reply: Jan 28, 2010 6:28 AM by 807567 RSS

    Scriting

    807567
      Hi ,

      Need a shell or perl script to check the connectivity of servers for evrsy 3 hrs , Need Help plssssssss:(
        • 1. Re: Scriting
          807567
          How big and clever does this need to be?
          A simple script that issues a singleping request against each server and checking the response may do the trick. You might need/want a separate file with a list of the servers, but either way it'd be the same.
          In pseudo-code:
          for server in the_list_of_severs
          do
            ping server
            if result not ok
            then
              report error
            end-if
          done
          The just 'slap' it in cron to run at the appropriate time (or have it call itself with an at now +3 hours) and you are off. I did something akin to this a while back and added some extra code to permit a single fail to be rechecked, but that was checking every 15 minutes.
          • 2. Re: Scriting
            807567
            Thanks