import socket in monitor.py