mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
Fix subnetcache statistics
This commit is contained in:
parent
520fa84265
commit
ebb4987146
4 changed files with 5 additions and 5 deletions
|
|
@ -813,7 +813,7 @@ print_mem(RES* ssl, struct worker* worker, struct daemon* daemon,
|
||||||
iter = mod_get_mem(&worker->env, "iterator");
|
iter = mod_get_mem(&worker->env, "iterator");
|
||||||
respip = mod_get_mem(&worker->env, "respip");
|
respip = mod_get_mem(&worker->env, "respip");
|
||||||
#ifdef CLIENT_SUBNET
|
#ifdef CLIENT_SUBNET
|
||||||
subnet = mod_get_mem(&worker->env, "subnet");
|
subnet = mod_get_mem(&worker->env, "subnetcache");
|
||||||
#endif /* CLIENT_SUBNET */
|
#endif /* CLIENT_SUBNET */
|
||||||
#ifdef USE_IPSECMOD
|
#ifdef USE_IPSECMOD
|
||||||
ipsecmod = mod_get_mem(&worker->env, "ipsecmod");
|
ipsecmod = mod_get_mem(&worker->env, "ipsecmod");
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ static void
|
||||||
set_subnet_stats(struct worker* worker, struct ub_server_stats* svr,
|
set_subnet_stats(struct worker* worker, struct ub_server_stats* svr,
|
||||||
int reset)
|
int reset)
|
||||||
{
|
{
|
||||||
int m = modstack_find(&worker->env.mesh->mods, "subnet");
|
int m = modstack_find(&worker->env.mesh->mods, "subnetcache");
|
||||||
struct subnet_env* sne;
|
struct subnet_env* sne;
|
||||||
if(m == -1)
|
if(m == -1)
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ worker_mem_report(struct worker* ATTR_UNUSED(worker),
|
||||||
(&worker->env, i);
|
(&worker->env, i);
|
||||||
#ifdef CLIENT_SUBNET
|
#ifdef CLIENT_SUBNET
|
||||||
else if(strcmp(worker->env.mesh->mods.mod[i]->name,
|
else if(strcmp(worker->env.mesh->mods.mod[i]->name,
|
||||||
"subnet")==0)
|
"subnetcache")==0)
|
||||||
subnet += (*worker->env.mesh->mods.mod[i]->get_mem)
|
subnet += (*worker->env.mesh->mods.mod[i]->get_mem)
|
||||||
(&worker->env, i);
|
(&worker->env, i);
|
||||||
#endif /* CLIENT_SUBNET */
|
#endif /* CLIENT_SUBNET */
|
||||||
|
|
@ -205,7 +205,7 @@ worker_mem_report(struct worker* ATTR_UNUSED(worker),
|
||||||
(&worker->env, i);
|
(&worker->env, i);
|
||||||
#ifdef CLIENT_SUBNET
|
#ifdef CLIENT_SUBNET
|
||||||
else if(strcmp(worker->env.mesh->mods.mod[i]->name,
|
else if(strcmp(worker->env.mesh->mods.mod[i]->name,
|
||||||
"subnet")==0)
|
"subnetcache")==0)
|
||||||
subnet += (*worker->env.mesh->mods.mod[i]->get_mem)
|
subnet += (*worker->env.mesh->mods.mod[i]->get_mem)
|
||||||
(&worker->env, i);
|
(&worker->env, i);
|
||||||
#endif /* CLIENT_SUBNET */
|
#endif /* CLIENT_SUBNET */
|
||||||
|
|
|
||||||
|
|
@ -281,7 +281,7 @@ void shm_main_run(struct worker *worker)
|
||||||
shm_stat->mem.subnet = 0;
|
shm_stat->mem.subnet = 0;
|
||||||
#ifdef CLIENT_SUBNET
|
#ifdef CLIENT_SUBNET
|
||||||
shm_stat->mem.subnet = (long long)mod_get_mem(&worker->env,
|
shm_stat->mem.subnet = (long long)mod_get_mem(&worker->env,
|
||||||
"subnet");
|
"subnetcache");
|
||||||
#endif
|
#endif
|
||||||
/* ipsecmod mem value is available in shm, also when not enabled,
|
/* ipsecmod mem value is available in shm, also when not enabled,
|
||||||
* to make the struct easier to memmap by other applications,
|
* to make the struct easier to memmap by other applications,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue