Pings some hosts in a loop and gives only information when the state changes