mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-23 02:42:28 +01:00
Added sessions to /-/monitorz
This commit is contained in:
parent
071b171b5f
commit
bf69f23e81
@ -1,5 +1,6 @@
|
||||
import { Router, Response, Request } from "express";
|
||||
import { route } from "@fosscord/api";
|
||||
import { Session } from "@fosscord/util";
|
||||
import os from "os";
|
||||
|
||||
const router = Router();
|
||||
@ -10,6 +11,7 @@ router.get("/", route({ right: "OPERATOR" }), async (req: Request, res: Response
|
||||
procUptime: process.uptime(),
|
||||
sysUptime: os.uptime(),
|
||||
memPercent: 100 - ((os.freemem() / os.totalmem()) * 100),
|
||||
sessions: await Session.count(),
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user