02-23-2010 10:04 PM
02-24-2010
06:21 AM
- last edited on
04-28-2026
09:58 AM
by
Content Cleaner
Hi Taurus,
Just heading out the door to the office, but I did find something that may be of some use to you:
https://forums.ni.com/t5/Example-Code/Task-manager-in-Labview/ta-p/3524904
This is a Labview implementation of a task manager like application. View the processes, select one to view CPU load and memory consumption. A new feature is the memory deallocation control, just in case the process start consuming to much memory.
Might not be exactly what you need. But could be of some use.
02-24-2010
05:57 PM
- last edited on
04-28-2026
10:00 AM
by
Content Cleaner
Patrick,
proc_manager.lvproj and the associated VIs do contain much of the functionality I am looking for. The user interface in TaskManager.vi does show CPU load, memory usage, and a lot of process specific information. I might be able to derive the system CPU load and Memory usage from the data. This is definitely a useful project. Someone put some time in to make the project work. The other three VIs each make use of a library call from a DLL (Dynamic-Link Library). The required Dynamic-Link Libraries are included in the project. This really is a great solution.
wtsapi32.dll, and psapi.dll are Microsoft Libraries. wtsapi32.dll and psapi.dll are proprietary to Microsoft. You can definitely find them in C:\WINDOWS\system32\. Sadly, this limits the VI to systems running a Microsoft operating system. I would not be surprised if the specifics of the DLLs changed over operating system versions.
I would prefer to find something a little closer to platform independent, but the idea of platform independent code is wishful thinking.
A close example might be getting the complete number of processing cores on a system by packages times, cores per package, times logical processors per core. This information can be obtained from the CPU Information Function: https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/functions/cpu-information.html
I say might be because according the site the function requires the base package. I am not sure if the base package is applicable to Windows, Mac, and Linux. Is it applicable to Windows, Mac, and Linuz
In my searching around online today, I did find something which has more information. sysinfo.zip has all of the information regarding short and long term storage. The user interface shows Operating system, Windows Directory, System Directory, Total Space on Drive C (MB), Free Space on Drive C (MB), Total Physical Memory (MB), Free Physical Memory (MB), Total Virtual Memory (MB), and Free Virtual Memory (MB). Investigating the C code a little shows it too is for Windows.
I can pull information from both to get all the information needed. It will work on Windows at least 😉
Thank you for your response. It has been most helpful.
Larga Vida y Prosperidad,
Bill
02-24-2010 08:52 PM
I'm surprised as well that there are not more functions available to access system functions.
sort of defeats the system independent G programming when you have to manually interface to windows DLL's.
Had to resort this several times as well (for example, get the user directory).
Would be nice if labview would provide more of these functions build in.