summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorPaul Jakma <paul@quagga.net>2010-01-09 16:15:00 +0000
committerPaul Jakma <paul@quagga.net>2010-12-08 16:53:09 +0000
commite276eb82820eb92d221f183496e28da4ffe0fe68 (patch)
tree33f8ab85f1bd68874589ca804049d2ec4958478a /lib/command.c
parent2613abe64fe48761d798942af8dc0ec90c804b22 (diff)
lib: Add a command to clear the thread CPU history data
* (general) this can be useful when investigating thread latency problems, when you don't want to have to restart a daemon between tests. * thread.c: (cpu_record_(hash_)clear) wipe the stored thread cpu history data, according to the filter, similar to the vty print code. (clear_thread_cpu_cmd) new command to clear data. * thread.h: export new command * command.c: install it
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c
index 478125f2..5a13f39c 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -3650,6 +3650,8 @@ cmd_init (int terminal)
install_element (VIEW_NODE, &show_thread_cpu_cmd);
install_element (ENABLE_NODE, &show_thread_cpu_cmd);
install_element (RESTRICTED_NODE, &show_thread_cpu_cmd);
+
+ install_element (ENABLE_NODE, &clear_thread_cpu_cmd);
install_element (VIEW_NODE, &show_work_queues_cmd);
install_element (ENABLE_NODE, &show_work_queues_cmd);
}