Could someone explain me this strange behavior?
I have dummy switch which show me state of internet connection.
I used script to update it as below
Code: Select all
commandArray = {}
ping_success=os.execute('ping -c1 8.8.8.8')
if ping_success then
print("ping success")
commandArray['Internet']='On'
else
print("ping fail")
ommandArray['Internet']='Off'
end
return commandArray
But in log in switch i have data every 3 seconds. Why not every 1min?
Code: Select all
2017-03-23 13:12:44 On
2017-03-23 13:12:40 On
2017-03-23 13:12:37 On
2017-03-23 13:12:34 On
2017-03-23 13:12:31 On
2017-03-23 13:12:28 On
2017-03-23 13:12:25 On
2017-03-23 13:12:22 On
2017-03-23 13:12:19 On
Regards