Added memory plugin support

This commit is contained in:
Damien Gasparina 2015-12-22 17:08:08 +01:00
parent 25393eb1be
commit 2f5e250f8d

View File

@ -63,6 +63,28 @@ function net_total_options() {
return { area: true };
}
/*
* mem
*/
function memory_usage_data(data) {
for (idata in data) {
ldata = data[idata];
/* Byte to MB */
data[idata].y = Math.round((data[idata].y / (1024 * 1024) ));
}
return data;
}
function memory_usage_graph(graph) {
graph.yAxis.axisLabel('Memory (MB)').tickFormat(function(d) { return d3.format('.2f')(d); });
}
function memory_usage_options() {
return { area: true };
}
/*
* MongoDB
*/