Monitoring Usage of External Drive Connected to Linux Real-Time Target

Updated Jul 20, 2021

Environment

Software

  • LabVIEW

This document will go through how you can use LabVIEW to monitor the free space or usage of an external USB drive or SD card connected to your NI Linux Real-Time target, such as a PXI or cRIO. 

As described in Using WebDAV to Transfer Files to Real-Time Target, external drives and SD cards show up as folders under the Real-Time Target. Using the assigned letter for the drive, we can monitor the free space of the external drive.

To do this, you can use either of the 2 following advanced file I/O functions: For each one, simply pass in the external drive letter/Real-Time targets folder to monitor.
For example, an external USB drive with an assigned drive letter of would have the file path of simple:
/U/

Using the "Get Volume info" or "File/Directory Info" on the cRIO with the path input as listed above, will return the free space and/or usage of the drive.