mirror of
https://github.com/ceph/ceph
synced 2025-03-06 08:20:12 +00:00
global: add process_name to crash meta
Signed-off-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
parent
60d4fa608e
commit
31e6d10e54
@ -34,3 +34,4 @@ const char *g_assert_condition = 0;
|
||||
unsigned long long g_assert_thread = 0;
|
||||
char g_assert_thread_name[4096];
|
||||
char g_assert_msg[8096];
|
||||
char g_process_name[NAME_MAX + 1];
|
||||
|
@ -15,6 +15,8 @@
|
||||
#ifndef CEPH_GLOBAL_CONTEXT_H
|
||||
#define CEPH_GLOBAL_CONTEXT_H
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "common/config_fwd.h"
|
||||
|
||||
class CephContext;
|
||||
@ -29,5 +31,6 @@ extern const char *g_assert_condition;
|
||||
extern unsigned long long g_assert_thread;
|
||||
extern char g_assert_thread_name[4096];
|
||||
extern char g_assert_msg[8096];
|
||||
extern char g_process_name[NAME_MAX + 1];
|
||||
|
||||
#endif
|
||||
|
@ -42,6 +42,7 @@
|
||||
static void global_init_set_globals(CephContext *cct)
|
||||
{
|
||||
g_ceph_context = cct;
|
||||
get_process_name(g_process_name, sizeof(g_process_name));
|
||||
}
|
||||
|
||||
static void output_ceph_version()
|
||||
|
@ -195,6 +195,7 @@ static void handle_fatal_signal(int signum)
|
||||
jf.open_object_section("crash");
|
||||
jf.dump_string("crash_id", id);
|
||||
now.gmtime(jf.dump_stream("timestamp"));
|
||||
jf.dump_string("process_name", g_process_name);
|
||||
jf.dump_string("entity_name", g_ceph_context->_conf->name.to_str());
|
||||
jf.dump_string("ceph_version", ceph_version_to_str());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user