NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Induvidual VI memory use RT

Hi,

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.

EDIT:

Also is there a way to observe events similar to event inspector?

Regards

Mrmas

Message 1 of 8
(3,872 Views)

Profile>>Performance and Memory actually works for RT targets as well.

Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 2 of 8
(3,525 Views)

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?

Thanks

Mrmas

0 Kudos
Message 3 of 8
(3,525 Views)

You'll need VI Server TCP access enabled on the RT target, otherwise we don't have access to the data.

Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 4 of 8
(3,525 Views)

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.

Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 5 of 8
(3,525 Views)

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.

Tim A.
0 Kudos
Message 6 of 8
(3,525 Views)

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?.

Regards

0 Kudos
Message 7 of 8
(3,525 Views)

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.

Tim A.
0 Kudos
Message 8 of 8
(3,525 Views)