UNLOCK(&vcl_mtx);
cli_out(cli, "Loaded \"%s\" as \"%s\"\n", fn , name);
vcl->conf->init_func(cli);
+ VSL_stats->n_vcl++;
+ VSL_stats->n_vcl_avail++;
return (0);
}
free(vcl->name);
(void)dlclose(vcl->dlh);
FREE_OBJ(vcl);
+ VSL_stats->n_vcl--;
+ VSL_stats->n_vcl_discard--;
}
/*--------------------------------------------------------------------*/
cli_out(cli, "VCL %s is the active VCL", av[2]);
return;
}
+ VSL_stats->n_vcl_discard++;
+ VSL_stats->n_vcl_avail--;
vcl->conf->discard = 1;
UNLOCK(&vcl_mtx);
if (vcl->conf->busy == 0)
MAC_STAT(sma_bfree, uint64_t, 'i', "SMA bytes free")
MAC_STAT(backend_req, uint64_t, 'a', "Backend requests made")
+
+MAC_STAT(n_vcl, uint64_t, 'a', "N vcl total")
+MAC_STAT(n_vcl_avail, uint64_t, 'a', "N vcl available")
+MAC_STAT(n_vcl_discard, uint64_t, 'a', "N vcl discarded")