added memory info

master
cheetah 4 years ago
parent 0498591e4a
commit 114ceb1fc1

@ -8,11 +8,11 @@
"connectors": { "connectors": {
"dummy": { "dummy": {
"enabled": true, "enabled": true,
"duplexTimeout": 30 "duplexTimeout": 300
}, },
"pocsag": { "pocsag": {
"enabled": true, "enabled": true,
"duplexTimeout": 30 "duplexTimeout": 300
}, },
"lorawan": { "lorawan": {
"enabled": true, "enabled": true,

@ -54,5 +54,12 @@ app.get('/api/device/:id', async (req, res) => {
: types.DeviceRegistry.DeviceStates[ req.params.id ] : types.DeviceRegistry.DeviceStates[ req.params.id ]
) )
}) })
const memstats = () => {
const used = process.memoryUsage()
for (let key in used) {
console.log(`${key} ${Math.round(used[key] / 1024 / 1024 * 100) / 100} MB`)
}
}
memstats()
setInterval(memstats, 10e3)
app.listen(3000) app.listen(3000)
Loading…
Cancel
Save