Example Code

Computer Memory Logger Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

The example used the .NET framework to record CPU and memory data and logs this data to a TDMS file.

 

Description

It is often difficult to track down visually exactly how much memory or CPU are being used on your computer at any point in time.  This VI calls into the .net framework and pulls your computer usage out and logs the data to a TDMS file.  You can then view the data with the TDMS viewer to see the trends of CPU, memory committed and percentage of your memory used. All you have to configure is how often you want to log your data.

 

Requirements

LabVIEW 2012 (or compatible)

.NET Framework 1.1 (or compatible) 

 

Steps to Implement or Execute Code

  1. Run the VI
  2. The VI will collect CPU and memory data as specified in the Record Interval (s) control and write the data to a TDMS file
  3. Stop the VI and view the recorded data

 

Additional Information or References

Front Panel of the VI

ScreenShot096.png

Windows systems only.  Will compile or update if you want to see anything in particular. Just make sure to comment on the usability or anything else.

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

ColeR
Field Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.