json.dump p2p peer state every 30 seconds