isisd: Provide statistics over number of generated purges

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
This commit is contained in:
Christian Franke 2018-11-24 00:36:37 +01:00 committed by Rodny Molina
parent 062f4d3691
commit 6f004b60ed
3 changed files with 6 additions and 0 deletions

View File

@ -386,6 +386,7 @@ static void lsp_purge(struct isis_lsp *lsp, int level,
lsp->hdr.rem_lifetime = 0;
lsp->level = level;
lsp->age_out = lsp->area->max_lsp_lifetime[level - 1];
lsp->area->lsp_purge_count[level - 1]++;
lsp_purge_add_poi(lsp, sender);
@ -1966,6 +1967,7 @@ void lsp_purge_non_exist(int level, struct isis_lsp_hdr *hdr,
lsp->level = level;
lsp_adjust_stream(lsp);
lsp->age_out = ZERO_AGE_LIFETIME;
lsp->area->lsp_purge_count[level - 1]++;
memcpy(&lsp->hdr, hdr, sizeof(lsp->hdr));
lsp->hdr.rem_lifetime = 0;

View File

@ -1274,6 +1274,9 @@ DEFUN (show_isis_summary,
vty_out(vty, " LSP0 regenerated: %" PRIu64 "\n",
area->lsp_gen_count[level - 1]);
vty_out(vty, " LSPs purged: %" PRIu64 "\n",
area->lsp_purge_count[level - 1]);
if (area->spf_timer[level - 1])
vty_out(vty, " SPF: (pending)\n");
else

View File

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