]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: move hashstats under debug, show per-daemon
authorDavid Lamparter <equinox@opensourcerouting.org>
Mon, 21 Aug 2017 12:34:31 +0000 (14:34 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Mon, 21 Aug 2017 12:41:02 +0000 (14:41 +0200)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/hash.c
vtysh/vtysh.c

index 66341cf2f1af68e9258225d28140aecc66417460..243521bef7cc7201efda7a1b4bd06d3174eeae9d 100644 (file)
@@ -335,12 +335,13 @@ void hash_free(struct hash *hash)
 
 /* CLI commands ------------------------------------------------------------ */
 
-DEFUN(show_hash_stats,
-      show_hash_stats_cmd,
-      "show hashtable [statistics]",
-      SHOW_STR
-      "Statistics about hash tables\n"
-      "Statistics about hash tables\n")
+DEFUN_NOSH(show_hash_stats,
+           show_hash_stats_cmd,
+           "show debugging hashtable [statistics]",
+           SHOW_STR
+           DEBUG_STR
+           "Statistics about hash tables\n"
+           "Statistics about hash tables\n")
 {
        struct hash *h;
        struct listnode *ln;
index 70c644247354053a8d458ce1d5364b339b3b10b0..85cbcae4dfa4db8b10b84e980a8c4e2b0cca1513 100644 (file)
@@ -1925,6 +1925,18 @@ DEFUN (vtysh_show_debugging,
                               "Debugging Information for %s:\n");
 }
 
+DEFUN (vtysh_show_debugging_hashtable,
+       vtysh_show_debugging_hashtable_cmd,
+       "show debugging hashtable [statistics]",
+       SHOW_STR
+       DEBUG_STR
+       "Statistics about hash tables\n"
+       "Statistics about hash tables\n")
+{
+       return show_per_daemon("do show debugging hashtable\n",
+                              "Hashtable statistics for %s:\n");
+}
+
 /* Memory */
 DEFUN (vtysh_show_memory,
        vtysh_show_memory_cmd,
@@ -3233,6 +3245,7 @@ void vtysh_init_vty(void)
 #endif
 
        install_element(VIEW_NODE, &vtysh_show_debugging_cmd);
+       install_element(VIEW_NODE, &vtysh_show_debugging_hashtable_cmd);
        install_element(VIEW_NODE, &vtysh_show_memory_cmd);
        install_element(VIEW_NODE, &vtysh_show_modules_cmd);