Exemple #1
0
def start():
    daemonize(stdout=p_dir+'/log_monitorout.log', stderr=p_dir+'/log_monitorerr.log',pidfile=p_dir+'/log_monitorpid.txt')
    global HOST, PORT

    server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
    ip, port = server.server_address

    server_thread = threading.Thread(target=server.serve_forever)
    server_thread.daemon = True
    server_thread.start()
    server.serve_forever()
Exemple #2
0
def start():
    daemonize(stdout=p_dir+'/log_monitorout_clientout.log', stderr=p_dir+'/log_monitor_client_err.log',pidfile=p_dir+'/log_monitor_clientpid.txt')
    monitor()