mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 08:27:08 +00:00
Add more info to diagnostics endpoint
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const os = require('os');
|
||||
const { statfs } = require('fs').promises;
|
||||
const { pool } = require('./db/connection');
|
||||
const cfg = require('./config');
|
||||
@@ -75,6 +76,15 @@ async function diagnostics () {
|
||||
data[path] = await df(paths[path]);
|
||||
}
|
||||
const res = {
|
||||
hostname: os.hostname(),
|
||||
memory: {
|
||||
total: os.totalmem(),
|
||||
free: os.freemem()
|
||||
},
|
||||
uptime: os.uptime(),
|
||||
loadavg: os.loadavg(),
|
||||
networkInterfaces: os.networkInterfaces(),
|
||||
cpus: os.cpus(),
|
||||
storage: {
|
||||
root: await df("/"),
|
||||
data
|
||||
|
||||
Reference in New Issue
Block a user