I was wondering if there was a way to log, read or observere in some way the memory usage of individual VIs on labview linux RT?
Something similar to the profile - performance and memory system on windows.
I have tried to use the RT trace toolkit, but i only manage to log very short (< 1 second) periodes, so i might be doing something wrong with that toolkit, but i cant really find instructions on how to use it.
Also is there a way to observe events similar to event inspector?
I have tried to use them before, but i never got any data. Is there a setting or a mode i need to run the RT target in?
You'll need VI Server TCP access enabled on the RT target, otherwise we don't have access to the data.
As to RT Exec Trace, you'll get a fixed size trace buffer (as defined by an input to the VIs). The default is fairly small, so on a busy system that ends up being a short period of tracing. On Pharlap systems you could only set the trace buffer size once without restarting the system (there is a requested buffer size input and actual buffer size output to let you know if there is a mismatch). I assume, but have not tested, that this behavior is the same for LinuxRT targets.
I've found that reviewing the RT Trace example VIs and the RT Trace's built in help document provide the best instructions on how to use it.
Also keep in mind that a trace can tell you execution timing for a VI or a specific thread and it can tell you when a memory allocation occurs but I don't think you can obtain the total amount of memory used by a specific VI using only the trace tool.
I got the profiler working by enabling VI server TCP on the RT target, thank you. I will try to use it to find any issues. I am correct in that the profiler can only be used while running the program on the RT target directly from the project/labview interface? I cant deploy the application and profile it running standalone?.
I've never actually tried this myself but my guess is you're right it wouldn't work. As you mention, there is likely a dependency of having the debug connection in the host environment to profile the VIs.
If it is possible, you'd probably need to first make sure the RT app is build as debuggable (Advanced Settings in the Build spec) and you'll want to connect to the running app on your RT target using the remote debug (LV Project Menu > Operate > Debug Application or Shared Library). After you have connected to the RT app remotely on the host system, I would load up the Memory/Profiler tool and see if your RT app shows up.