[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 25/39] qemu_kill_report: Report PID name too
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 25/39] qemu_kill_report: Report PID name too |
Date: |
Fri, 7 Oct 2016 18:57:49 +0200 |
From: Michal Privoznik <address@hidden>
When qemu is being killed, its last words are:
2016-08-31T11:48:15.293587Z qemu-system-x86_64: terminating on signal 15 from
pid 11180
That's nice, but what process is 11180? What if I told you we can
do better:
2016-08-31T11:48:15.293587Z qemu-system-x86_64: terminating on signal 15 from
pid 11180 (/usr/sbin/libvirtd)
And that's exactly what this patch does.
Signed-off-by: Michal Privoznik <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
vl.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/vl.c b/vl.c
index f3abd99..6c5a51c 100644
--- a/vl.c
+++ b/vl.c
@@ -1675,8 +1675,12 @@ static void qemu_kill_report(void)
*/
error_report("terminating on signal %d", shutdown_signal);
} else {
- error_report("terminating on signal %d from pid " FMT_pid,
- shutdown_signal, shutdown_pid);
+ char *shutdown_cmd = qemu_get_pid_name(shutdown_pid);
+
+ error_report("terminating on signal %d from pid " FMT_pid " (%s)",
+ shutdown_signal, shutdown_pid,
+ shutdown_cmd ? shutdown_cmd : "<unknown process>");
+ g_free(shutdown_cmd);
}
shutdown_signal = -1;
}
--
2.7.4
- [Qemu-devel] [PULL 14/39] qom/object: update class cache atomically, (continued)
- [Qemu-devel] [PULL 14/39] qom/object: update class cache atomically, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 15/39] qom/cpu: atomically clear the tb_jmp_cache, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 16/39] cpu: atomically modify cpu->exit_request, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 17/39] util/qht: atomically set b->hashes, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 18/39] linux-user/syscall: extend lock around cpu-list, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 19/39] qga/command: use QEMU atomic primitives, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 20/39] .travis.yml: add gcc sanitizer build, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 22/39] char: use a fixed idx for child muxed chr, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 21/39] i8259: give ISA device when registering ISA ioports, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 23/39] char: update read handler in all cases, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 25/39] qemu_kill_report: Report PID name too,
Paolo Bonzini <=
- [Qemu-devel] [PULL 24/39] util: Introduce qemu_get_pid_name, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 26/39] qemu-nbd: Shrink image size by specified offset, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 27/39] qht: simplify qht_reset_size, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 28/39] qht: fix unlock-after-free segfault upon resizing, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 30/39] qemu-tech: drop index, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 29/39] test-qht: perform lookups under rcu_read_lock, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 31/39] qemu-doc: replace introduction with the one from the internals manual, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 33/39] qemu-tech: move text from qemu-tech to tcg/README, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 32/39] qemu-doc: drop installation and compilation notes, Paolo Bonzini, 2016/10/07
- [Qemu-devel] [PULL 36/39] qemu-tech: move TCG test documentation to tests/tcg/README, Paolo Bonzini, 2016/10/07