i have a virtual switch made to see the status of my tablet (testping).
this is the script i use
Code: Select all
commandArray = {}
ping_success=os.execute('ping -c1 192.168.0.113') --tablet
if ping_success then
print("tablet online")
commandArray['testping']='On'
else
print("tablet offline")
commandArray['testping']='Off'
end
return commandArray
the script works fine but....i want my virtual switch to change only if the ping result changes
in other words the "last seen" time not updated every 30 or what seconds....
can anyone help me?
hmmm not working fine afterall.when i am offline i get:
Error: EventSystem: Warning!, lua script test ping has been running for more than 10 seconds
HELP
