first public source commit
This commit is contained in:
1 parent
1a4fbb9d42
commit
3914fee775
65 files changed
+4697
-312
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { cpu, drive, mem, netstat } from "node-os-utils";
|
||||
|
||||
export default async function handler(req, res) {
|
||||
const { disk } = req.query;
|
||||
|
||||
res.send({
|
||||
cpu: {
|
||||
usage: await cpu.usage(),
|
||||
load: cpu.loadavgTime(5),
|
||||
},
|
||||
drive: await drive.info(disk || "/"),
|
||||
memory: await mem.info(),
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user