OpenWebRX will show verbose debug information on USR1 signal
This commit is contained in:
parent
020af11d1a
commit
4a79c6762a
19
openwebrx.py
19
openwebrx.py
@ -74,8 +74,24 @@ 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
|
||||||
|
if sig == signal.SIGUSR1:
|
||||||
|
print "[openwebrx] Verbose status information on USR1 signal"
|
||||||
|
print
|
||||||
|
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."
|
print "[openwebrx] Ctrl+C: aborting."
|
||||||
cleanup_clients(True)
|
cleanup_clients(True)
|
||||||
spectrum_dsp.stop()
|
spectrum_dsp.stop()
|
||||||
@ -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