]> git.puffer.fish Git - mirror/frr.git/commitdiff
vtysh: add "show memory" for a single daemon
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 8 Apr 2021 15:47:43 +0000 (18:47 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 8 Apr 2021 15:47:43 +0000 (18:47 +0300)
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
vtysh/vtysh.c

index 3764188292a8d013f52e0fa93dab72e74bd9f874..931eb91593d6a18bb025c5633ba3b5bf729bb672 100644 (file)
@@ -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");
 }