OpenWebRX will show verbose debug information on USR1 signal
This commit is contained in:
parent
020af11d1a
commit
4a79c6762a
27
openwebrx.py
27
openwebrx.py
@ -74,12 +74,28 @@ def import_all_plugins(directory):
|
|||||||
class MultiThreadHTTPServer(ThreadingMixIn, HTTPServer):
|
class MultiThreadHTTPServer(ThreadingMixIn, HTTPServer):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def handle_signal(signal, frame):
|
def handle_signal(sig, frame):
|
||||||
global spectrum_dsp
|
global spectrum_dsp
|
||||||
print "[openwebrx] Ctrl+C: aborting."
|
if sig == signal.SIGUSR1:
|
||||||
cleanup_clients(True)
|
print "[openwebrx] Verbose status information on USR1 signal"
|
||||||
spectrum_dsp.stop()
|
print
|
||||||
os._exit(1) #not too graceful exit
|
print "time.time() =", time.time()
|
||||||
|
print "clients_mutex.locked() =", clients_mutex.locked()
|
||||||
|
print "clients_mutex_locker =", clients_mutex_locker
|
||||||
|
if server_fail: print "server_fail = ", server_fail
|
||||||
|
print "spectrum_thread_watchdog_last_tick =", spectrum_thread_watchdog_last_tick
|
||||||
|
print
|
||||||
|
print "clients:",len(clients)
|
||||||
|
for client in clients:
|
||||||
|
print
|
||||||
|
for key in client._fields:
|
||||||
|
print "\t%s = %s"%(key,str(getattr(client,key)))
|
||||||
|
|
||||||
|
else:
|
||||||
|
print "[openwebrx] Ctrl+C: aborting."
|
||||||
|
cleanup_clients(True)
|
||||||
|
spectrum_dsp.stop()
|
||||||
|
os._exit(1) #not too graceful exit
|
||||||
|
|
||||||
def access_log(data):
|
def access_log(data):
|
||||||
global logs
|
global logs
|
||||||
@ -109,6 +125,7 @@ def main():
|
|||||||
|
|
||||||
#Set signal handler
|
#Set signal handler
|
||||||
signal.signal(signal.SIGINT, handle_signal) #http://stackoverflow.com/questions/1112343/how-do-i-capture-sigint-in-python
|
signal.signal(signal.SIGINT, handle_signal) #http://stackoverflow.com/questions/1112343/how-do-i-capture-sigint-in-python
|
||||||
|
signal.signal(signal.SIGUSR1, handle_signal)
|
||||||
|
|
||||||
#Load plugins
|
#Load plugins
|
||||||
import_all_plugins("plugins/dsp/")
|
import_all_plugins("plugins/dsp/")
|
||||||
|
Loading…
Reference in New Issue
Block a user