The attached reference example includes subVIs to read the current CPU usage and memory usage of a Windows machine.
These VIs read information using functions available in standard Windows DLLs and will not work on other platforms. They have been tested in Windows XP, but not other versions of Windows to date.
Figure 1: System Monitor example VI
There are three subVIs to monitor CPU usage as the Windows SDK requires you to initialize and configure a query which you can then execute many times to retrieve the current CPU usage level. You should not call the Tools_System CPU Usage VI more than once per second in order to allow the monitor to adequately average the measured data.
Figure 2: Example diagram showing the use of the CPU Usage VIs
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.