mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
MINOR: debug: show boot and runtime process settings in table
Let's reformat output of "show dev" in order to show some boot and runtime process settings in a table. This makes the output less crowded.
This commit is contained in:
parent
df7f16d960
commit
8620ae7962
42
src/debug.c
42
src/debug.c
@ -596,12 +596,6 @@ static int debug_parse_cli_show_dev(char **args, char *payload, struct appctx *a
|
|||||||
for (i = 0; i < post_mortem.process.argc; i++)
|
for (i = 0; i < post_mortem.process.argc; i++)
|
||||||
chunk_appendf(&trash, "%s ", post_mortem.process.argv[i]);
|
chunk_appendf(&trash, "%s ", post_mortem.process.argv[i]);
|
||||||
chunk_appendf(&trash, "\n");
|
chunk_appendf(&trash, "\n");
|
||||||
|
|
||||||
chunk_appendf(&trash, " boot uid: %d\n", post_mortem.process.boot_uid);
|
|
||||||
chunk_appendf(&trash, " runtime uid: %d\n", post_mortem.process.run_uid);
|
|
||||||
chunk_appendf(&trash, " boot gid: %d\n", post_mortem.process.boot_gid);
|
|
||||||
chunk_appendf(&trash, " runtime gid: %d\n", post_mortem.process.run_gid);
|
|
||||||
|
|
||||||
#if defined(USE_LINUX_CAP)
|
#if defined(USE_LINUX_CAP)
|
||||||
/* let's dump saved in feed_post_mortem() initial capabilities sets */
|
/* let's dump saved in feed_post_mortem() initial capabilities sets */
|
||||||
if(!post_mortem.process.caps.err_boot) {
|
if(!post_mortem.process.caps.err_boot) {
|
||||||
@ -635,25 +629,25 @@ static int debug_parse_cli_show_dev(char **args, char *payload, struct appctx *a
|
|||||||
chunk_appendf(&trash, " capget() failed at runtime with: %s.\n",
|
chunk_appendf(&trash, " capget() failed at runtime with: %s.\n",
|
||||||
errname(post_mortem.process.caps.err_run, &err));
|
errname(post_mortem.process.caps.err_run, &err));
|
||||||
#endif
|
#endif
|
||||||
chunk_appendf(&trash, " boot limits:\n");
|
|
||||||
chunk_appendf(&trash, " \tfd limit (soft): %s\n",
|
|
||||||
LIM2A(normalize_rlim(post_mortem.process.boot_lim_fd.rlim_cur), "unlimited"));
|
|
||||||
chunk_appendf(&trash, " \tfd limit (hard): %s\n",
|
|
||||||
LIM2A(normalize_rlim(post_mortem.process.boot_lim_fd.rlim_max), "unlimited"));
|
|
||||||
chunk_appendf(&trash, " \tram limit (soft): %s\n",
|
|
||||||
LIM2A(normalize_rlim(post_mortem.process.boot_lim_ram.rlim_cur), "unlimited"));
|
|
||||||
chunk_appendf(&trash, " \tram limit (hard): %s\n",
|
|
||||||
LIM2A(normalize_rlim(post_mortem.process.boot_lim_ram.rlim_max), "unlimited"));
|
|
||||||
|
|
||||||
chunk_appendf(&trash, " runtime limits:\n");
|
chunk_appendf(&trash, " %-22s %-11s %-11s \n", "identity:", "-boot-", "-runtime-");
|
||||||
chunk_appendf(&trash, " \tfd limit (soft): %s\n",
|
chunk_appendf(&trash, " %-22s %-11d %-11d \n", " uid:", post_mortem.process.boot_uid,
|
||||||
LIM2A(normalize_rlim(post_mortem.process.run_lim_fd.rlim_cur), "unlimited"));
|
post_mortem.process.run_uid);
|
||||||
chunk_appendf(&trash, " \tfd limit (hard): %s\n",
|
chunk_appendf(&trash, " %-22s %-11d %-11d \n", " gid:", post_mortem.process.boot_gid,
|
||||||
LIM2A(normalize_rlim(post_mortem.process.run_lim_fd.rlim_max), "unlimited"));
|
post_mortem.process.run_gid);
|
||||||
chunk_appendf(&trash, " \tram limit (soft): %s\n",
|
chunk_appendf(&trash, " %-22s %-11s %-11s \n", "limits:", "-boot-", "-runtime-");
|
||||||
LIM2A(normalize_rlim(post_mortem.process.run_lim_ram.rlim_cur), "unlimited"));
|
chunk_appendf(&trash, " %-22s %-11s %-11s \n", " fd limit (soft):",
|
||||||
chunk_appendf(&trash, " \tram limit (hard): %s\n",
|
LIM2A(normalize_rlim((ulong)post_mortem.process.boot_lim_fd.rlim_cur), "unlimited"),
|
||||||
LIM2A(normalize_rlim(post_mortem.process.run_lim_ram.rlim_max), "unlimited"));
|
LIM2A(normalize_rlim((ulong)post_mortem.process.run_lim_fd.rlim_cur), "unlimited"));
|
||||||
|
chunk_appendf(&trash, " %-22s %-11s %-11s \n", " fd limit (hard):",
|
||||||
|
LIM2A(normalize_rlim((ulong)post_mortem.process.boot_lim_fd.rlim_max), "unlimited"),
|
||||||
|
LIM2A(normalize_rlim((ulong)post_mortem.process.run_lim_fd.rlim_max), "unlimited"));
|
||||||
|
chunk_appendf(&trash, " %-22s %-11s %-11s \n", " ram limit (soft):",
|
||||||
|
LIM2A(normalize_rlim((ulong)post_mortem.process.boot_lim_ram.rlim_cur), "unlimited"),
|
||||||
|
LIM2A(normalize_rlim((ulong)post_mortem.process.run_lim_ram.rlim_cur), "unlimited"));
|
||||||
|
chunk_appendf(&trash, " %-22s %-11s %-11s \n", " ram limit (hard):",
|
||||||
|
LIM2A(normalize_rlim((ulong)post_mortem.process.boot_lim_ram.rlim_max), "unlimited"),
|
||||||
|
LIM2A(normalize_rlim((ulong)post_mortem.process.run_lim_ram.rlim_max), "unlimited"));
|
||||||
|
|
||||||
ha_free(&err);
|
ha_free(&err);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user