<html><head></head><body>Sweet! Take it one step further and write the data to a rrd and live plot it. Rrdtool or prometheus/grafana with pushgateway.<br><br>One the head is wrapped around how prometheus and grafana work, they will likely replace rrdtool graphs. <br><br><a href="https://vinayakpandey-7997.medium.com/pushing-bash-script-result-to-prometheus-using-pushgateway-a0760cd261e">https://vinayakpandey-7997.medium.com/pushing-bash-script-result-to-prometheus-using-pushgateway-a0760cd261e</a><br><br>If systemd makes you gag, please substitute appropriate sysV start/stop stuff. It's just an example of how to do something and not an offer to start a flame war.<br><br>Flame war topics "best beer style" (obviously an Imperial Stout is the clear winner) and "the best pasta shape" (clearly rotini since is holds sauce best) are the only 2 worth discussing. :-)<br><br><div class="gmail_quote">On March 28, 2021 9:05:26 AM EDT, DJ-Pfulio via Ale <ale@ale.org> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">That's what bing.com is for - best to use the IP for that.<br>#########################<br>#!/bin/bash<br># let other crontabs run 1st<br>sleep 10s;<br># 1 ping only (in Sean Connery voice)<br>PING=`/bin/ping -c 1 204.79.197.200|/bin/grep loss`<br>NOW=`/bin/date +'%F-%H%M%S'`<br>echo "$NOW $PING"<br>#########################<br>Then have the crontab throw it into a log file:<br>MAILTO=root<br>LOG=/var/log/internet-up.log<br>SCRIPT=/usr/local/sbin/internet-up.sh<br>*/2 * * * * root if [ -x $SCRIPT ]; then $SCRIPT >> $LOG fi<br>#########################<br><br>Then you can grep the log file for <br>"100% packet loss"<br>and<br>"0% packet loss"<br><br>lines to know how much downtime there is. This script is a little <br>more complex - the output from last week. I rotate log files Sunday<br>mornings.<br>#########################<br>$ /usr/local/sbin/internet-up-summary.sh /var/log/internet-up.log.1.gz <br> Using /var/log/internet-up.log.1.gz ... <br> Using /tmp/internet-up.log.1<br> ... <br> Period 20210321-062611 - 20210328-062411<br> Total Time: 10080 (min) 168.00 (hrs)<br> Percent Up Time: 99.98 % <br> Percent Down Time: 0.02 % <br> Total Down Time: 2 min or 0.03 hrs<br> Currently: UP<br> Removing /tmp/internet-up.log.1<br>#########################<br><br>Or did I miss the question?<br><br><br>On 3/28/21 4:21 AM, Alex Carver via Ale wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Would anyone (or multiple anyones) be willing to be a ping recipient<br>for a few days? I'm trying to determine how many times my connection<br>drops and for approximately how long. The plan is to record the<br>results of a ping to each host at a rate of one per minute for a few<br>days so I can spot any short or long duration drops.<br><br>I already know it's dropping in the early morning hours because my<br>daily speed test is failing completely. I just want to get a higher<br>resolution check of connection status.<br></blockquote><hr>Ale mailing list<br>Ale@ale.org<br><a href="https://mail.ale.org/mailman/listinfo/ale">https://mail.ale.org/mailman/listinfo/ale</a><br>See JOBS, ANNOUNCE and SCHOOLS lists at<br><a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a><br></pre></blockquote></div><br>-- <br>Computers amplify human error<br>Super computers are really cool</body></html>