이 내용은 고객님의 설정 언어로 확인할 수 없습니다

이 내용은 다른 사용 가능한 언어로 표시됩니다. 고객님께서 사용하시는 브라우저에 텍스트 번역에 도움이되는 기능이 포함되어 있을 수 있습니다.

Error -2147220623: Largest Memory Block Property Does Not Exist

Updated Aug 9, 2023

Reported In

Hardware

  • CompactRIO Controller

Software

  • LabVIEW Real-Time Module

Operating System

  • NI Linux Real-Time

Issue Details

I have been using the System Property Node and Distributed System Manager (DSM) with my NI Linux Real-Time OS target but am getting some issues:
  • It is not correctly reporting the amount of free physical memory on my system.
  • I am getting error -2147220623 on my NI Linux Real-Time system when
    • Trying to monitor RAM usage on NI Linux Real-Time
    • Using Largest Memory Block Property
Error -2147220623 occurred at an unidentified location
Possible reason(s):
NI System Configuration: The property does not exist for this resource.

Solution

To monitor memory usage on your NI Linux Real-Time Target, you can use the System Exec VI to run commands in the Linux shell. The command  cat /proc/$(pidof lvrt)/status | grep RSS returns the Resident Set Size of the LabVIEW process (Resident Set Size gives the amount of memory allocated to a process).

Note: This does not report total memory usage of the entire OS, which has its own memory consuming processes. This method of memory monitoring is primarily useful for detecting memory leaks.

You can try this by setting up a LabVIEW project with your NI Linux Real-Time OS device and creating a VI that resembles the block diagram below.

Additional Information

On NI Linux Real-Time OS targets, the Free Physical Memory Property Node of the System Configuration API along with the Distributed System Manager fail to give an accurate accounting of the free physical memory on the device. Memory management and reporting on Linux devices differs significantly from targets running operating systems such as Windows or VxWorks. It can be difficult to get a simple accounting of system memory usage due to how memory management and reporting is handled by the Linux OS.However, we can use the tools provided by the Linux OS to accurately monitor the memory usage on the real-time device. To get an accurate account of memory usage, we can look at the process on the device that uses the most memory. When we deploy a real-time application written using the LabVIEW Real-Time Module, we expect the LabVIEW process to use the largest amount of memory.
On the NI Linux Real-Time OS, you can also get helpful information about memory usage on the Real-Time target by opening  cat /proc/meminfo directly from the target.