Important Update: See new ispReport version 3.0 for the latest version of this tool.
My Internet Service Provider (ISP) is usually very reliable. However, whenever problems arise, the ISP typically takes weeks before reaching final resolution. I typically start to notice Internet speed drops due to packet loss far before my Internet access completely stops working. It would be nice if I had a summary report and detailed logs that I could send to the ISP support to show exactly when problems started, how long that the problems have been going on and what degree of degradation that I have experienced over that time. I looked for a tool that could provide this sort of information and couldn't find anything that really met my needs. So, I wrote a script called ispReport for this purpose. The rest of this blog post details the script's capabilities and usage.
What ispReport Does
This ispReport script pings yahoo.com and abc.com every 5 minutes. If there is any packet loss or ping can't reach the target hosts, it stores the ping results in a log file. You can run "ispReport showlog" to view the contents of the log and "ispReport report" to show a summary report of logged data.
Download
You can download ispReport-v1.0 here. It works on Solaris, Linux, and the OS-X.
ispReport has the following 9 subcommands.
start - Start the script
stop - Stop the script
status - Check the status to see if it is running or not
report - Create a report from the log file
showlog - Examine the contents of the log file
install - Install the script
uninstall - Uninstall the script
init - Archive the existing log file and create a new log file.
usage - See the usage of the script
Sample Log
The following is a sample log as seen by running "ispReport report".
2010/12/28 10:29:47|yahoo.com|0|ping: cannot resolve yahoo.com: Unknown host
2010/12/28 10:29:47|abc.com|0|ping: cannot resolve abc.com: Unknown host
2010/12/28 11:15:47|yahoo.com|12|47.776/51.426/63.937/2.684
2010/12/28 11:28:09|abc.com|26|45.276/53.851/65.548/4.271
Column 1: Date and time stamp
Column 2: Host being pinged
Column 3: ISP State in terms of percentage up
Column 4: Number of packets sent
Column 5: Round-Trip Time (rtt) statistics - min/avg/max/mdev
The pipe (|) deliminted columns when the host is NOT reachable are as follows:
Column 1: Date and time stamp
Column 2: Host being pinged
Column 3: ISP State in terms of percentage up
Column 4: Error message
Sample Report
One of the most important things that I need to provide support is a quantification of the outage incurred. The report function provides a summary of the outage data for all dates logged in the log file.
Below is a sample output from running "ispReport report".
This report summarizes the number of times per day
that packet loss was detected over each of four
packet loss percentage ranges. For example, the
number in the second column represents the number
of times that a packet loss of 1-24% was detected.
that packet loss was detected over each of four
packet loss percentage ranges. For example, the
number in the second column represents the number
of times that a packet loss of 1-24% was detected.
Date 1-24% 25-49% 50-74% 75-100%
2010/12/27 4 0 0 8
2010/12/28 2 0 0 2
Brad
If this information has helped you, please consider helping me through investing in your health and in the health of those you love through purchasing Mannatech wellness products. Ambrotose is the key ingredient of all Mannatech Wellness products. Place your order at my Mannatech Web Store today.
PS: As always, the sample scripts provided are for reference and are not supported in any way.
PS: As always, the sample scripts provided are for reference and are not supported in any way.


0 comments:
Post a Comment