fazalmajid / pingwatch

Simple monitoring tool for your Internet connection, pings hosts and reports on availability and trends
BSD 2-Clause "Simplified" License
29 stars 4 forks source link

weird sawtooth pattern bug? #17

Open aslmx opened 3 years ago

aslmx commented 3 years ago

Hi Fazal,

Just a few minutes ago i experienced a "sawtooth" ping pattern again. I don't really know what causes this, it resolves immediately if i restart the pingwatch process.

I have seen this 2 or 3 times before.

Pingwatch_Screenshot_2021-02-03_13-20-27

2021/02/03 13:14:11 ping 192.168.2.41(192.168.2.41) = 570.6µs                                                                                                                                                                         
2021/02/03 13:14:11 ping 192.168.2.1(192.168.2.1) = 1.092675ms                                                                                                                                                                        
2021/02/03 13:14:11 ping ns.inwx.de(192.174.68.104) = 30.945854ms                                                                                                                                                                     
2021/02/03 13:14:11 ping 8.8.8.8(8.8.8.8) = 37.961193ms                                                                                                                                                                               
2021/02/03 13:14:11 ping ns3.inwx.eu(213.239.206.103) = 38.57463ms      
2021/02/03 13:14:11 ping hostname.tld(4.3.2.1) = 39.621968ms          
2021/02/03 13:14:11 ping www.google.com(142.250.74.196) = 40.457829ms       
2021/02/03 13:14:11 ping 1.2.3.4(1.2.3.4) = 47.512003ms 
2021/02/03 13:14:11 ping diagnosis.yunohost.org(80.67.172.144) = 45.696003ms
2021/02/03 13:14:16 ping 192.168.2.41(192.168.2.41) = -1h0m0s    
2021/02/03 13:14:16 ping 192.168.2.1(192.168.2.1) = -1h0m0s             
2021/02/03 13:14:16 ping 8.8.8.8(8.8.8.8) = -1h0m0s                     
2021/02/03 13:14:16 ping 1.2.3.4(1.2.3.4) = -1h0m0s     
2021/02/03 13:14:16 ping ns3.inwx.eu(213.239.206.103) = -1h0m0s      
2021/02/03 13:14:16 ping hostname.tld(4.3.2.1) = -1h0m0s              
2021/02/03 13:14:16 ping ns.inwx.de(192.174.68.104) = -1h0m0s           
2021/02/03 13:14:16 ping www.google.com(142.250.74.196) = -1h0m0s       
2021/02/03 13:14:16 ping diagnosis.yunohost.org(80.67.172.144) = -1h0m0s
2021/02/03 13:14:18 found 3 points                                  
2021/02/03 13:14:21 ping 192.168.2.41(192.168.2.41) = 398.366µs             
2021/02/03 13:14:21 ping 192.168.2.1(192.168.2.1) = 2.081485ms              
2021/02/03 13:14:21 ping 8.8.8.8(8.8.8.8) = 36.042549ms            
2021/02/03 13:14:21 ping ns.inwx.de(192.174.68.104) = 30.822329ms   
2021/02/03 13:14:21 ping ns3.inwx.eu(213.239.206.103) = 38.001899ms     
2021/02/03 13:14:21 ping hostname.tld(4.3.2.1) = 39.596325ms          
2021/02/03 13:14:21 ping 1.2.3.4(1.2.3.4) = 47.257802ms  
2021/02/03 13:14:21 ping diagnosis.yunohost.org(80.67.172.144) = 44.404136ms
2021/02/03 13:14:21 ping www.google.com(216.58.207.68) = 36.826182ms
2021/02/03 13:14:26 ping 192.168.2.41(192.168.2.41) = -1h0m0s        
2021/02/03 13:14:26 ping 192.168.2.1(192.168.2.1) = -1h0m0s             
2021/02/03 13:14:26 ping 8.8.8.8(8.8.8.8) = -1h0m0s                     
2021/02/03 13:14:26 ping 1.2.3.4(1.2.3.4) = -1h0m0s     
2021/02/03 13:14:26 ping ns3.inwx.eu(213.239.206.103) = -1h0m0s             
2021/02/03 13:14:26 ping ns.inwx.de(192.174.68.104) = -1h0m0s           
2021/02/03 13:14:26 ping hostname.tld(4.3.2.1) = -1h0m0s       
2021/02/03 13:14:26 ping diagnosis.yunohost.org(80.67.172.144) = -1h0m0s
2021/02/03 13:14:26 ping www.google.com(216.58.207.68) = -1h0m0s    
2021/02/03 13:14:28 found 2 points                                 
2021/02/03 13:14:31 ping 192.168.2.41(192.168.2.41) = 912.938µs
2021/02/03 13:14:31 ping 192.168.2.1(192.168.2.1) = 2.420154ms
2021/02/03 13:14:31 ping 8.8.8.8(8.8.8.8) = 36.488513ms
2021/02/03 13:14:31 ping ns.inwx.de(192.174.68.104) = 31.868353ms
2021/02/03 13:14:31 ping www.google.com(216.58.207.68) = 38.358688ms
2021/02/03 13:14:31 ping 1.2.3.4(1.2.3.4) = 45.605199ms
2021/02/03 13:14:31 ping hostname.tld(4.3.2.1) = 41.02578ms
2021/02/03 13:14:31 ping ns3.inwx.eu(213.239.206.103) = 42.930436ms
2021/02/03 13:14:31 ping diagnosis.yunohost.org(80.67.172.144) = 46.133388ms
2021/02/03 13:14:36 ping 192.168.2.41(192.168.2.41) = -1h0m0s
2021/02/03 13:14:36 ping 8.8.8.8(8.8.8.8) = -1h0m0s
2021/02/03 13:14:36 ping 192.168.2.1(192.168.2.1) = -1h0m0s
2021/02/03 13:14:36 ping 1.2.3.4(1.2.3.4) = -1h0m0s
2021/02/03 13:14:36 ping ns.inwx.de(192.174.68.104) = -1h0m0s
2021/02/03 13:14:36 ping ns3.inwx.eu(213.239.206.103) = -1h0m0s
2021/02/03 13:14:36 ping www.google.com(216.58.207.68) = -1h0m0s
2021/02/03 13:14:36 ping hostname.tld(4.3.2.1) = -1h0m0s
2021/02/03 13:14:36 ping diagnosis.yunohost.org(80.67.172.144) = -1h0m0s
2021/02/03 13:14:38 found 2 points

Any idea?

fazalmajid commented 3 years ago

You have a really short interval of 5 seconds IIRC. The loop that send pings is a bit sloppy in the cadence at which it sends pings, and the default ping timeout itself is your interval, so it could easily get out of sequence. You could try changing the ping timeout . There isn't a command-line flag for it, it's in pinger.go at line 76:

Timeout:   5 * time.Second,
aslmx commented 3 years ago

Okay, thanks for the hint. I might also just decrease my interval to 10s again... ;)