Find the answer to your Linux question:
Results 1 to 5 of 5
We have an Asterisk machine that we suspect periodically loses internet connectivity, causing all calls to drop. First, would this sort of thing be logged anywhere out of the box? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    2

    Detecting and Logging Lost Internet Connection


    We have an Asterisk machine that we suspect periodically loses internet connectivity, causing all calls to drop. First, would this sort of thing be logged anywhere out of the box? I haven't noticed anything in /var/log, but that doesn't mean it's not there. If this is not typically logged, does anyone have any suggestions as to how I might go about logging it? I'm currently running a bash script from cron every 5 or 10 minutes which pings Google and writes success or failure messages to a log file. This works fine for extended outages, but if the internet connection drops and comes back between cron runs, it won't be caught. Any ideas?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,174
    It's easy enough to detect/log lost internet connections, but since it is happening, you need to do a root-cause analysis to determine what exactly is causing it. My experience has been that it is a connection problem - a ground fault with a DSL circuit, moisture in connectors for cable, ISP hardware failing (v-slam failing), or even your modem/router/NIC starting to fail. My own business most common internet connection problems (hight-speed DSL) have been due to wiring problems outside the premises that require a line technician to come out and fix. So, after eliminating NIC/Router/Modem problems, I'd contact the ISP to analyze the line for attenuation, ground-faults, etc.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,174
    One other problem I have had in the past was my ISP releasing my DHCP address every so often. As a result, I now use static IP addresses and don't have that problem any longer!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Just Joined!
    Join Date
    Apr 2010
    Posts
    2
    Quote Originally Posted by Rubberman View Post
    It's easy enough to detect/log lost internet connections
    Could you please elaborate on how?

    Quote Originally Posted by Rubberman View Post
    So, after eliminating NIC/Router/Modem problems, I'd contact the ISP to analyze the line for attenuation, ground-faults, etc.
    This is what we intend to do. We're looking to have specific occurrences to point to when we do, hence the need for logging.

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    11,174
    I'd write an application or script that does a short ping (no more than 10 tries) to a known outside system (or systems, alternating them over time so as to avoid being seen as a denial-of-service attack), which would write a log record to a file and/or send an email message to the sysadmin when it cannot access outside systems. If it fails, you might have it double-check by pinging one of your ISP's servers, such as their DNS servers, which should always be available. Your sysadmin can then use something like traceroute to verify that you cannot get past your network edge, and that your router is working properly.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •