Skip to content

Commit

Permalink
refactor: add server memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Jan 1, 2025
1 parent e78d3b2 commit 6ab9d8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/monitoring/src/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const getServerMetrics = async () => {

console.log("Memory:", mem);
const memTotalGB = mem.total / 1024 / 1024 / 1024;
const memUsedGB = (mem.total - mem.available) / 1024 / 1024 / 1024;
const memUsedGB = (mem.total - mem.free - mem.buffcache) / 1024 / 1024 / 1024;
const memUsedPercent = (memUsedGB / memTotalGB) * 100;

return {
Expand Down

0 comments on commit 6ab9d8a

Please sign in to comment.