Skip to content

Commit

Permalink
Add data on actual disk used that is compared to maxstorage
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSully committed Mar 20, 2024
1 parent f5e367d commit 41733d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/modules/keydb_modstatsd/modmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ std::unordered_map<std::string, StatsRecord> g_mapInfoFields = {
{ "used_memory_rss", { StatsD_Type::STATSD_GAUGE_BYTES }},
{ "maxmemory", { StatsD_Type::STATSD_GAUGE_BYTES, false /* prefixOnly */}},
{ "maxstorage", { StatsD_Type::STATSD_GAUGE_BYTES, false /* prefixOnly */}},
{ "storage_used", { StatsD_Type::STATSD_GAUGE_BYTES, false /* prefixOnly */}},
{ "used_memory_dataset_perc", { StatsD_Type::STATSD_GAUGE_FLOAT }},
{ "avg_lock_contention", { StatsD_Type::STATSD_GAUGE_LONGLONG }},
{ "repl_backlog_size", { StatsD_Type::STATSD_GAUGE_BYTES }},
Expand Down
6 changes: 4 additions & 2 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5827,7 +5827,8 @@ sds genRedisInfoString(const char *section) {
"lazyfreed_objects:%zu\r\n"
"storage_provider:%s\r\n"
"available_system_memory:%s\r\n"
"maxstorage:%llu\r\n",
"maxstorage:%llu\r\n"
"storage_used:%llu\r\n",
zmalloc_used,
hmem,
g_pserver->cron_malloc_stats.process_rss,
Expand Down Expand Up @@ -5874,7 +5875,8 @@ sds genRedisInfoString(const char *section) {
lazyfreeGetFreedObjectsCount(),
g_pserver->m_pstorageFactory ? g_pserver->m_pstorageFactory->name() : "none",
available_system_mem,
g_pserver->maxstorage
g_pserver->maxstorage,
g_pserver->m_pstorageFactory ? g_pserver->m_pstorageFactory->totalDiskspaceUsed() : 0
);
freeMemoryOverheadData(mh);
}
Expand Down

0 comments on commit 41733d7

Please # to comment.