Add the size of json cache to the data reported by ovsdb-server appctl "memory/show" command.
Signed-off-by: Andy Zhou <az...@ovn.org> --- ovsdb/monitor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ovsdb/monitor.c b/ovsdb/monitor.c index 6b0d13d..f9cd965 100644 --- a/ovsdb/monitor.c +++ b/ovsdb/monitor.c @@ -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 = { -- 1.9.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev