From f09e0369f6c90377183f3a0c2e08d7f1e0b1e65f Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Thu, 8 Apr 2021 18:47:43 +0300 Subject: [PATCH] vtysh: add "show memory" for a single daemon Signed-off-by: Igor Ryzhov --- vtysh/vtysh.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 3764188292..931eb91593 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -2932,10 +2932,15 @@ DEFUN (vtysh_show_history, /* Memory */ DEFUN (vtysh_show_memory, vtysh_show_memory_cmd, - "show memory", + "show memory [" DAEMONS_LIST "]", SHOW_STR - "Memory statistics\n") + "Memory statistics\n" + DAEMONS_STR) { + if (argc == 3) + return show_one_daemon(vty, argv, argc - 1, + argv[argc - 1]->text); + return show_per_daemon(vty, argv, argc, "Memory statistics for %s:\n"); } -- 2.39.5