diff --git a/public/language/en-GB/admin/advanced/database.json b/public/language/en-GB/admin/advanced/database.json
index f7db6220ee..b88ca6fc82 100644
--- a/public/language/en-GB/admin/advanced/database.json
+++ b/public/language/en-GB/admin/advanced/database.json
@@ -1,6 +1,7 @@
{
"x-b": "%1 b",
"x-mb": "%1 mb",
+ "x-gb": "%1 gb",
"uptime-seconds": "Uptime in Seconds",
"uptime-days": "Uptime in Days",
diff --git a/src/database/mongo.js b/src/database/mongo.js
index aadd5dbfe7..273ec18001 100644
--- a/src/database/mongo.js
+++ b/src/database/mongo.js
@@ -201,7 +201,7 @@ mongoModule.info = function (db, callback) {
return callback(err);
}
var stats = results.stats;
- var scale = 1024 * 1024;
+ var scale = 1024 * 1024 * 1024;
results.listCollections = results.listCollections.map(function (collectionInfo) {
return {
@@ -216,6 +216,10 @@ mongoModule.info = function (db, callback) {
});
stats.mem = results.serverStatus.mem;
+ stats.mem = results.serverStatus.mem;
+ stats.mem.resident = (stats.mem.resident / 1024).toFixed(2);
+ stats.mem.virtual = (stats.mem.virtual / 1024).toFixed(2);
+ stats.mem.mapped = (stats.mem.mapped / 1024).toFixed(2);
stats.collectionData = results.listCollections;
stats.network = results.serverStatus.network;
stats.raw = JSON.stringify(stats, null, 4);
diff --git a/src/database/redis.js b/src/database/redis.js
index 0127a61600..9ebc154705 100644
--- a/src/database/redis.js
+++ b/src/database/redis.js
@@ -152,7 +152,7 @@ redisModule.info = function (cxn, callback) {
redisData[parts[0]] = parts[1];
}
});
-
+ redisData.used_memory_human = (redisData.used_memory / (1024 * 1024 * 1024)).toFixed(2);
redisData.raw = JSON.stringify(redisData, null, 4);
redisData.redis = true;
diff --git a/src/views/admin/advanced/database.tpl b/src/views/admin/advanced/database.tpl
index c9003e52f9..9519ce9141 100644
--- a/src/views/admin/advanced/database.tpl
+++ b/src/views/admin/advanced/database.tpl
@@ -13,16 +13,16 @@
[[admin/advanced/database:mongo.objects]] {mongo.objects}
[[admin/advanced/database:mongo.avg-object-size]] [[admin/advanced/database:x-b, {mongo.avgObjSize}]]