mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 13:24:37 +00:00
vtysh: Rename show thread ...
to show event ...
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
1903b819fd
commit
e0422df53b
73
lib/event.c
73
lib/event.c
@ -302,13 +302,16 @@ static uint8_t parse_filter(const char *filterstr)
|
|||||||
return filter;
|
return filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN_NOSH (show_thread_cpu,
|
#if CONFDATE > 20240707
|
||||||
show_thread_cpu_cmd,
|
CPP_NOTICE("Remove `show thread ...` commands")
|
||||||
"show thread cpu [FILTER]",
|
#endif
|
||||||
SHOW_STR
|
DEFUN_NOSH (show_event_cpu,
|
||||||
"Thread information\n"
|
show_event_cpu_cmd,
|
||||||
"Thread CPU usage\n"
|
"show event cpu [FILTER]",
|
||||||
"Display filter (rwtex)\n")
|
SHOW_STR
|
||||||
|
"Event information\n"
|
||||||
|
"Event CPU usage\n"
|
||||||
|
"Display filter (rwtexb)\n")
|
||||||
{
|
{
|
||||||
uint8_t filter = (uint8_t)-1U;
|
uint8_t filter = (uint8_t)-1U;
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
@ -327,6 +330,14 @@ DEFUN_NOSH (show_thread_cpu,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALIAS(show_event_cpu,
|
||||||
|
show_thread_cpu_cmd,
|
||||||
|
"show thread cpu [FILTER]",
|
||||||
|
SHOW_STR
|
||||||
|
"Thread information\n"
|
||||||
|
"Thread CPU usage\n"
|
||||||
|
"Display filter (rwtex)\n")
|
||||||
|
|
||||||
DEFPY (service_cputime_stats,
|
DEFPY (service_cputime_stats,
|
||||||
service_cputime_stats_cmd,
|
service_cputime_stats_cmd,
|
||||||
"[no] service cputime-stats",
|
"[no] service cputime-stats",
|
||||||
@ -368,7 +379,7 @@ DEFPY (service_walltime_warning,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_thread_poll_helper(struct vty *vty, struct event_loop *m)
|
static void show_event_poll_helper(struct vty *vty, struct event_loop *m)
|
||||||
{
|
{
|
||||||
const char *name = m->name ? m->name : "main";
|
const char *name = m->name ? m->name : "main";
|
||||||
char underline[strlen(name) + 1];
|
char underline[strlen(name) + 1];
|
||||||
@ -409,24 +420,30 @@ static void show_thread_poll_helper(struct vty *vty, struct event_loop *m)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN_NOSH (show_thread_poll,
|
DEFUN_NOSH (show_event_poll,
|
||||||
show_thread_poll_cmd,
|
show_event_poll_cmd,
|
||||||
"show thread poll",
|
"show event poll",
|
||||||
SHOW_STR
|
SHOW_STR
|
||||||
"Thread information\n"
|
"Event information\n"
|
||||||
"Show poll FD's and information\n")
|
"Event Poll Information\n")
|
||||||
{
|
{
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
struct event_loop *m;
|
struct event_loop *m;
|
||||||
|
|
||||||
frr_with_mutex (&masters_mtx) {
|
frr_with_mutex (&masters_mtx) {
|
||||||
for (ALL_LIST_ELEMENTS_RO(masters, node, m))
|
for (ALL_LIST_ELEMENTS_RO(masters, node, m))
|
||||||
show_thread_poll_helper(vty, m);
|
show_event_poll_helper(vty, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALIAS(show_event_poll,
|
||||||
|
show_thread_poll_cmd,
|
||||||
|
"show thread poll",
|
||||||
|
SHOW_STR
|
||||||
|
"Thread information\n"
|
||||||
|
"Show poll FD's and information\n")
|
||||||
|
|
||||||
DEFUN (clear_thread_cpu,
|
DEFUN (clear_thread_cpu,
|
||||||
clear_thread_cpu_cmd,
|
clear_thread_cpu_cmd,
|
||||||
@ -453,7 +470,7 @@ DEFUN (clear_thread_cpu,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_thread_timers_helper(struct vty *vty, struct event_loop *m)
|
static void show_event_timers_helper(struct vty *vty, struct event_loop *m)
|
||||||
{
|
{
|
||||||
const char *name = m->name ? m->name : "main";
|
const char *name = m->name ? m->name : "main";
|
||||||
char underline[strlen(name) + 1];
|
char underline[strlen(name) + 1];
|
||||||
@ -470,28 +487,37 @@ static void show_thread_timers_helper(struct vty *vty, struct event_loop *m)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFPY_NOSH (show_thread_timers,
|
DEFPY_NOSH (show_event_timers,
|
||||||
show_thread_timers_cmd,
|
show_event_timers_cmd,
|
||||||
"show thread timers",
|
"show event timers",
|
||||||
SHOW_STR
|
SHOW_STR
|
||||||
"Thread information\n"
|
"Event information\n"
|
||||||
"Show all timers and how long they have in the system\n")
|
"Show all timers and how long they have in the system\n")
|
||||||
{
|
{
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
struct event_loop *m;
|
struct event_loop *m;
|
||||||
|
|
||||||
frr_with_mutex (&masters_mtx) {
|
frr_with_mutex (&masters_mtx) {
|
||||||
for (ALL_LIST_ELEMENTS_RO(masters, node, m))
|
for (ALL_LIST_ELEMENTS_RO(masters, node, m))
|
||||||
show_thread_timers_helper(vty, m);
|
show_event_timers_helper(vty, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALIAS(show_event_timers,
|
||||||
|
show_thread_timers_cmd,
|
||||||
|
"show thread timers",
|
||||||
|
SHOW_STR
|
||||||
|
"Thread information\n"
|
||||||
|
"Show all timers and how long they have in the system\n")
|
||||||
|
|
||||||
void event_cmd_init(void)
|
void event_cmd_init(void)
|
||||||
{
|
{
|
||||||
install_element(VIEW_NODE, &show_thread_cpu_cmd);
|
install_element(VIEW_NODE, &show_thread_cpu_cmd);
|
||||||
|
install_element(VIEW_NODE, &show_event_cpu_cmd);
|
||||||
install_element(VIEW_NODE, &show_thread_poll_cmd);
|
install_element(VIEW_NODE, &show_thread_poll_cmd);
|
||||||
|
install_element(VIEW_NODE, &show_event_poll_cmd);
|
||||||
install_element(ENABLE_NODE, &clear_thread_cpu_cmd);
|
install_element(ENABLE_NODE, &clear_thread_cpu_cmd);
|
||||||
|
|
||||||
install_element(CONFIG_NODE, &service_cputime_stats_cmd);
|
install_element(CONFIG_NODE, &service_cputime_stats_cmd);
|
||||||
@ -499,6 +525,7 @@ void event_cmd_init(void)
|
|||||||
install_element(CONFIG_NODE, &service_walltime_warning_cmd);
|
install_element(CONFIG_NODE, &service_walltime_warning_cmd);
|
||||||
|
|
||||||
install_element(VIEW_NODE, &show_thread_timers_cmd);
|
install_element(VIEW_NODE, &show_thread_timers_cmd);
|
||||||
|
install_element(VIEW_NODE, &show_event_timers_cmd);
|
||||||
}
|
}
|
||||||
/* CLI end ------------------------------------------------------------------ */
|
/* CLI end ------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
@ -2942,35 +2942,38 @@ static int show_one_daemon(struct vty *vty, struct cmd_token **argv, int argc,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (vtysh_show_thread_timer,
|
#if CONFDATE > 20240707
|
||||||
vtysh_show_thread_timer_cmd,
|
CPP_NOTICE("Remove `show thread ...` commands")
|
||||||
"show thread timers",
|
#endif
|
||||||
|
DEFUN (vtysh_show_event_timer,
|
||||||
|
vtysh_show_event_timer_cmd,
|
||||||
|
"show event timers",
|
||||||
SHOW_STR
|
SHOW_STR
|
||||||
"Thread information\n"
|
"Event information\n"
|
||||||
"Show all timers and how long they have in the system\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");
|
return show_per_daemon(vty, argv, argc, "Event timers for %s:\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (vtysh_show_poll,
|
DEFUN (vtysh_show_event_poll,
|
||||||
vtysh_show_poll_cmd,
|
vtysh_show_event_poll_cmd,
|
||||||
"show thread poll",
|
"show event poll",
|
||||||
SHOW_STR
|
SHOW_STR
|
||||||
"Thread information\n"
|
"Event information\n"
|
||||||
"Thread Poll Information\n")
|
"Event Poll Information\n")
|
||||||
{
|
{
|
||||||
return show_per_daemon(vty, argv, argc, "Thread statistics for %s:\n");
|
return show_per_daemon(vty, argv, argc, "Event statistics for %s:\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (vtysh_show_thread,
|
DEFUN (vtysh_show_event,
|
||||||
vtysh_show_thread_cmd,
|
vtysh_show_event_cpu_cmd,
|
||||||
"show thread cpu [FILTER]",
|
"show event cpu [FILTER]",
|
||||||
SHOW_STR
|
SHOW_STR
|
||||||
"Thread information\n"
|
"Event information\n"
|
||||||
"Thread CPU usage\n"
|
"Event CPU usage\n"
|
||||||
"Display filter (rwtexb)\n")
|
"Display filter (rwtexb)\n")
|
||||||
{
|
{
|
||||||
return show_per_daemon(vty, argv, argc, "Thread statistics for %s:\n");
|
return show_per_daemon(vty, argv, argc, "Event statistics for %s:\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (vtysh_show_work_queues,
|
DEFUN (vtysh_show_work_queues,
|
||||||
@ -5201,9 +5204,9 @@ void vtysh_init_vty(void)
|
|||||||
install_element(VIEW_NODE, &vtysh_show_modules_cmd);
|
install_element(VIEW_NODE, &vtysh_show_modules_cmd);
|
||||||
install_element(VIEW_NODE, &vtysh_show_work_queues_cmd);
|
install_element(VIEW_NODE, &vtysh_show_work_queues_cmd);
|
||||||
install_element(VIEW_NODE, &vtysh_show_work_queues_daemon_cmd);
|
install_element(VIEW_NODE, &vtysh_show_work_queues_daemon_cmd);
|
||||||
install_element(VIEW_NODE, &vtysh_show_thread_cmd);
|
install_element(VIEW_NODE, &vtysh_show_event_cpu_cmd);
|
||||||
install_element(VIEW_NODE, &vtysh_show_poll_cmd);
|
install_element(VIEW_NODE, &vtysh_show_event_poll_cmd);
|
||||||
install_element(VIEW_NODE, &vtysh_show_thread_timer_cmd);
|
install_element(VIEW_NODE, &vtysh_show_event_timer_cmd);
|
||||||
|
|
||||||
/* Logging */
|
/* Logging */
|
||||||
install_element(VIEW_NODE, &vtysh_show_logging_cmd);
|
install_element(VIEW_NODE, &vtysh_show_logging_cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user