Skip to content

Commit

Permalink
ovsdb-server: Add Json cache count to memory/show
Browse files Browse the repository at this point in the history
Add the size of json cache to the data reported by ovsdb-server appctl
"memory/show" command.

Signed-off-by: Andy Zhou <[email protected]>
Acked-by: Ben Pfaff <[email protected]>
  • Loading branch information
azhou-nicira committed Mar 11, 2016
1 parent 989d713 commit 8302b6d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ovsdb/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,12 @@ ovsdb_monitor_destroy_callback(struct ovsdb_replica *replica)
void
ovsdb_monitor_get_memory_usage(struct simap *usage)
{
struct ovsdb_monitor *dbmon;
simap_put(usage, "monitors", hmap_count(&ovsdb_monitors));

HMAP_FOR_EACH(dbmon, hmap_node, &ovsdb_monitors) {
simap_increase(usage, "json-caches", hmap_count(&dbmon->json_cache));
}
}

static const struct ovsdb_replica_class ovsdb_jsonrpc_replica_class = {
Expand Down

0 comments on commit 8302b6d

Please sign in to comment.