Hi ,
I am new to node-red and JS.
In my project i am using the below mentioned CPU
Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Model: 4
Model name: ARMv7 Processor rev 4 (v7l)
CPU max MHz: 1200.0000
CPU min MHz: 600.0000
BogoMIPS: 76.80
Flags: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
To monitor the memory usage, I am using memory node from 'node-red-contrib-os 0.2.1',
I have implemented this logic on three different project. all these project are same as other.
I was wondering the response from each of these h/w on this memory usage are different and unable to match the result of this node result with the 'top' command result.
Note : All the three device has a same node version [node-red-contrib-os 0.2.1]
Please do refer the attachment and please advise which one of them are showing the right memory usage ?
Is there any configuration to be done on the OS to meet the node response with the Top command ?
If you are confident that the images you have posted really do relate to the top results shown, then the only conclusion I can come to is that the node does not work as one would expect.
Edit, If you install freemem and compare with that, what do you see?
Hi Colin,
Thanks for responding to my query.
Yes the image is right, not sure why the node are working properly.
Can you Please provide more info on the 'freemem' installation ?
Is it a flow, which I need to install ? or it's a command like 'free -h'
It is a command, but I see it is not available on Pi os, so ignore that.
Does free agree with top? I can only suggest posting an issue on the node's github page so the author can comment.
Hello, in this node we are just using node js memory function …
Unless you have a different node js version or found a problem in node js code base I don’t think there is any fix …
As said in GitHub:
On this node we only use node-js vanilla command:
let tmem = os.totalmem();
let fmem = os.freemem();
const pmem = parseFloat((100 - (fmem / tmem) * 100).toFixed(2));