]> sourceware.org Git - lvm2.git/commitdiff
lvmdbusd: Add SIGUSR2 to dump flight recorder
authorTony Asleson <tasleson@redhat.com>
Tue, 9 Aug 2022 22:44:10 +0000 (17:44 -0500)
committerTony Asleson <tasleson@redhat.com>
Fri, 16 Sep 2022 15:49:36 +0000 (10:49 -0500)
daemons/lvmdbusd/main.py
daemons/lvmdbusd/utils.py

index 7b455052ed4bc7312f4e6371b4b6c0d8b56a7c1d..5e6f72cdc0df485b5c4d11162d8e13cf921e1d8c 100644 (file)
@@ -77,6 +77,7 @@ def install_signal_handlers():
                signal_add(GLib.PRIORITY_HIGH, signal.SIGHUP, utils.handler, signal.SIGHUP)
                signal_add(GLib.PRIORITY_HIGH, signal.SIGINT, utils.handler, signal.SIGINT)
                signal_add(GLib.PRIORITY_HIGH, signal.SIGUSR1, utils.handler, signal.SIGUSR1)
+               signal_add(GLib.PRIORITY_HIGH, signal.SIGUSR2, utils.handler, signal.SIGUSR2)
        else:
                log_error("GLib.unix_signal_[add|add_full] are NOT available!")
 
index d24a34935c4598edf1c177781ed0c15fa66ea676..a10fa786436c5374d4296969fc6229169a8788d7 100644 (file)
@@ -346,8 +346,12 @@ def dump_threads_stackframe():
 # noinspection PyUnusedLocal
 def handler(signum):
        try:
+               # signal 10
                if signum == signal.SIGUSR1:
                        dump_threads_stackframe()
+               # signal 12
+               elif signum == signal.SIGUSR2:
+                       cfg.blackbox.dump()
                else:
                        cfg.run.value = 0
                        log_debug('Exiting daemon with signal %d' % signum)
This page took 0.035267 seconds and 5 git commands to generate.