ping.py: ping to decide the server up or down