Merge pull request #538 from tduboys/fix_subnetcache_statistics

Fix subnetcache statistics
This commit is contained in:
Wouter Wijngaards 2021-09-03 16:41:07 +02:00 committed by GitHub
commit 4c90250043
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View file

@ -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");

View file

@ -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;

View file

@ -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 */

View file

@ -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,