01-07-2016 02:02 PM
So for anyone who comes across this thread, the issue I was seeing is that under Linux-based RT systems, the amount of free memory reported by the system property node is incorrect. I think I have a decent solution to anyone else that can't get over the fact RAM usage is near 100% when writing to files often. It involves calling a shell command to get the memory details and figuring out % free manually.
Thanks again to Craig
Corey
03-28-2016 02:07 PM
crotunno,
Thanks for following up on this with your implementation, this post helped me find a very similar issue in my own code. One thing I wanted to point out is that your implemenation uses MemAvailable, whereas the KB Craig linked indicates that MemFree + Cached + Buffers is the correct value.
In my system, MemAvailable was actually about 100 MB lower than the combined value, so you may have more resources than you expected. My implementation is below. It executes in almost exactly the same time as yours (15.846 ms vs. 15.795 ms over 1000 trials), so no downside in pulling more values out of the string.
04-20-2018 01:36 PM
As far as I can tell, @Craig_ is correct. I spent a whole day trying to figure out what the issue with this was, but then I found this thread, tried the new (correct) way of polling my cRIO 9036 (Linux RTOS) memory and confirmed that memory was not actually growing. Thanks!