LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can a VI monitor its own memory usage, as in the "Windows Task Manager"?

I'm in Windows XP, and want to monitor LabVIEW's memory usage number seen in the "Mem Usage" column of the "Processes" tab of "Windows Task Manager".
0 Kudos
Message 1 of 7
(6,140 Views)

Opena VI reference to the VI in question and look for the properties in the "metrics" section.

Of course the task manager does not report memory on a VI basis, just the entire LabVIEW process, so you most likely won't get the same numbers.

Message Edited by altenbach on 07-30-2007 07:53 AM

Message 2 of 7
(6,136 Views)
Open the example finder. There is also a shipping example called "Memory Monitor". Use it directly or look at the code for ideas. 😄
Message 3 of 7
(6,125 Views)
I'm trying to catch memory leaks that LabVIEW wouldn't be aware of, like forgetting to close an open reference.

I'll bet there's a way to get that "Windows Task Manager" number, such as a .NET framework call, but I can't find it.
0 Kudos
Message 4 of 7
(6,120 Views)
OK, open the exmaple finder, search for keyword ".NET" and have a look at the example:
 
"Simple process monitor". It uses .net to get all you possibly want. 😄

Message Edited by altenbach on 07-30-2007 08:22 AM

Message 5 of 7
(6,112 Views)
Thanks Smiley Very Happy

That is exactly what I was looking for.
0 Kudos
Message 6 of 7
(6,097 Views)

Opena VI reference to the VI in question and look for the properties in the "metrics" section.

 

--- For the record, this does not work.  The help plainly states that "You cannot read this property if the VI is running".

That means that a VI cannot monitor itself (or it's children).

 

If you try, you get 0 and an error ("The VI is not in a state compatible with this operation").

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 7 of 7
(5,300 Views)