summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-02-23 16:14:53 +0100
committerDonald Sharp <sharpd@nvidia.com>2022-02-28 12:39:07 +0100
commit22f31b8c525bb73a8c2e7602c6a6996b608913f5 (patch)
tree2d626dc96237e28cb4c8f5c01d38aab4fa9c058d /vtysh
parentMerge pull request #10376 from patrasar/master_pimv6_vtysh (diff)
downloadfrr-22f31b8c525bb73a8c2e7602c6a6996b608913f5.tar.xz
frr-22f31b8c525bb73a8c2e7602c6a6996b608913f5.zip
lib, vtysh: Add `show thread timers` command
Add the ability to inspect the timers and when they will pop per daemon: sharpd@eva ~/frr (thread_return_null)> vtysh -c "show thread timers" Thread timers for zebra: Showing timers for default -------------------------- rtadv_timer 00:00:00.520 if_zebra_speed_update 00:00:02.745 if_zebra_speed_update 00:00:02.745 if_zebra_speed_update 00:00:02.745 if_zebra_speed_update 00:00:02.745 if_zebra_speed_update 00:00:02.745 if_zebra_speed_update 00:00:02.745 if_zebra_speed_update 00:00:02.746 if_zebra_speed_update 00:00:02.744 if_zebra_speed_update 00:00:02.745 Showing timers for Zebra dplane thread -------------------------------------- Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index fe7a2e73f..a1cb02f31 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -2715,6 +2715,16 @@ static int show_one_daemon(struct vty *vty, struct cmd_token **argv, int argc,
return ret;
}
+DEFUN (vtysh_show_thread_timer,
+ vtysh_show_thread_timer_cmd,
+ "show thread timers",
+ SHOW_STR
+ "Thread information\n"
+ "Show all timers and how long they have in the system\n")
+{
+ return show_per_daemon(vty, argv, argc, "Thread timers for %s:\n");
+}
+
DEFUN (vtysh_show_poll,
vtysh_show_poll_cmd,
"show thread poll",
@@ -4508,6 +4518,7 @@ void vtysh_init_vty(void)
install_element(VIEW_NODE, &vtysh_show_work_queues_daemon_cmd);
install_element(VIEW_NODE, &vtysh_show_thread_cmd);
install_element(VIEW_NODE, &vtysh_show_poll_cmd);
+ install_element(VIEW_NODE, &vtysh_show_thread_timer_cmd);
/* Logging */
install_element(VIEW_NODE, &vtysh_show_logging_cmd);