Logs for Unexpected cRio Reboots on NI Linux RT

Updated Jul 15, 2026

Reported In

Hardware

  • CompactRIO Controller

Operating System

  • Linux
  • LabVIEW Real-Time (NI Linux Real-Time)

Issue Details

I have an NI Linux RT controller that reboots unexpectedly at random times. After the system restarts, I cannot find any useful logs to determine what caused the reboot. It appears that the logs are missing or cleared after each restart.

Solution

NI Linux Real-Time systems store logs in volatile memory by default, which causes them to be cleared during a reboot. To retain logs and diagnose unexpected restarts, enable persistent logging and collect logs from relevant directories.
 
  1. Check whether logs are stored in volatile memory:
    • Run the following command:
      ls -ld /var/log
      
    • Verify whether /var/log points to:
      /var/volatile/log
      
      If it does, logs are stored in RAM and will not persist after reboot.
  2. Check the NI Linux Real-Time version:
    • Run the following command:
      cat /etc/os-release
      
  3. Enable persistent logging:
    • For NI Linux RT 9.1 or later, run:
      nirtcfg --set section=SystemSettings,token=PersistentLogs.enabled,value="True"
      
    • If using NI Linux RT 9.1 specifically, also run:
      /etc/init.d/ni-configpersistentlogs
      
      Note: Starting with NI Linux RT 11.2, persistent logging is enabled by default.
  4. Restart the system to apply the configuration changes.
  5. Collect logs after the next unexpected reboot:
    • Retrieve logs from the following directories:
      /var/log/
      /var/local/natinst/log/
      /var/lib/pstore/
      
    • Use /var/lib/pstore/ to review kernel logs from previous system crashes.

Additional Information

On NI Linux Real-Time systems, the /var/log directory is a symbolic link to a volatile location in memory to prevent excessive disk usage. Enabling persistent logging redirects logs to non-volatile storage, allowing analysis after a reboot.
Kernel crash logs are preserved using the pstore mechanism and can be found under /var/lib/pstore/ after reboot, if a crash occurred.