When executing this command from ``vtysh``, each of the daemons' memory
usage is printed sequentially.
+.. index:: show history
+.. clicmd:: show history
+
+ Dump the vtysh cli history.
+
.. index:: logmsg LEVEL MESSAGE
.. clicmd:: logmsg LEVEL MESSAGE
return CMD_SUCCESS;
}
+DEFUN (vtysh_show_history,
+ vtysh_show_history_cmd,
+ "show history",
+ SHOW_STR
+ "The list of commands stored in history\n")
+{
+ HIST_ENTRY **hlist = history_list();
+ int i = 0;
+
+ while (hlist[i]) {
+ vty_out(vty, "%s\n", hlist[i]->line);
+ i++;
+ }
+ return CMD_SUCCESS;
+}
+
/* Memory */
DEFUN (vtysh_show_memory,
vtysh_show_memory_cmd,
install_element(CONFIG_NODE, &debug_nb_cmd);
/* misc lib show commands */
+ install_element(VIEW_NODE, &vtysh_show_history_cmd);
install_element(VIEW_NODE, &vtysh_show_memory_cmd);
install_element(VIEW_NODE, &vtysh_show_modules_cmd);
install_element(VIEW_NODE, &vtysh_show_work_queues_cmd);