summary refs log tree commit diff
path: root/bundle/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-17 20:37:13 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-17 20:37:13 +0200
commit70d9aa669e48bcc225c8afa2790fe57151c99277 (patch)
treefb2ccfd601384a8c4bc77220bbd95db78f1f28d5 /bundle/src
parent:bug: fix login route (diff)
downloadserver-70d9aa669e48bcc225c8afa2790fe57151c99277.tar.xz
:loud_sound: verbose error handler
Diffstat (limited to 'bundle/src')
-rw-r--r--bundle/src/stats.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/bundle/src/stats.ts b/bundle/src/stats.ts
index 0a10a855..6413f347 100644
--- a/bundle/src/stats.ts
+++ b/bundle/src/stats.ts
@@ -9,14 +9,15 @@ export function initStats() {
 
 	setInterval(async () => {
 		const [cpuUsed, memory, network] = await Promise.all([osu.cpu.usage(), osu.mem.info(), osu.netstat.inOut()]);
+		var networkUsage = "";
 		if (typeof network === "object") {
-			console.log(`[Network]: in ${network.total.inputMb}mb | out ${network.total.outputMb}mb`);
+			networkUsage = `| [Network]: in ${network.total.inputMb}mb | out ${network.total.outputMb}mb`;
 		}
 
 		console.log(
 			`[CPU] ${cpuUsed.toFixed(2)}% | [Memory] ${Math.round(
 				process.memoryUsage().rss / 1024 / 1024
-			)}mb/${memory.totalMemMb.toFixed(0)}mb`
+			)}mb/${memory.totalMemMb.toFixed(0)}mb ${networkUsage}`
 		);
 	}, 1000 * 30);
 }