isisd: Provide statistics over number of LSP regenerations

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
This commit is contained in:
Christian Franke 2018-11-23 21:36:26 +01:00 committed by Rodny Molina
parent 86d6f80d5d
commit 062f4d3691
3 changed files with 7 additions and 0 deletions

View File

@ -1240,6 +1240,7 @@ int lsp_generate(struct isis_area *area, int level)
lsp_seqno_update(newlsp);
newlsp->last_generated = time(NULL);
lsp_flood(newlsp, NULL);
area->lsp_gen_count[level - 1]++;
refresh_time = lsp_refresh_time(newlsp, rem_lifetime);
@ -1300,6 +1301,7 @@ static int lsp_regenerate(struct isis_area *area, int level)
lsp->hdr.rem_lifetime = rem_lifetime;
lsp->last_generated = time(NULL);
lsp_flood(lsp, NULL);
area->lsp_gen_count[level - 1]++;
for (ALL_LIST_ELEMENTS_RO(lsp->lspu.frags, node, frag)) {
if (!frag->tlvs) {
/* Updating and flooding should only affect fragments

View File

@ -1270,6 +1270,10 @@ DEFUN (show_isis_summary,
continue;
vty_out(vty, " Level-%d:\n", level);
vty_out(vty, " LSP0 regenerated: %" PRIu64 "\n",
area->lsp_gen_count[level - 1]);
if (area->spf_timer[level - 1])
vty_out(vty, " SPF: (pending)\n");
else

View File

@ -149,6 +149,7 @@ struct isis_area {
uint16_t min_spf_interval[ISIS_LEVELS];
/* the percentage of LSP mtu size used, before generating a new frag */
int lsp_frag_threshold;
uint64_t lsp_gen_count[ISIS_LEVELS];
int ip_circuits;
/* logging adjacency changes? */
uint8_t log_adj_changes;