Since the NI sbRIO-9627 ships with the NI Linux RT, you must first set sudo permissions before applying the cache memory clear command. By default, the access ID for NI devices running NI Linux RT is lvuser. And since this lvuser does not have permission to enter and apply various commands in the NI Linux RT, you need to grant lvuser the sudo privilege of Super User Do. Then enter the cache memory clear command Echo 3 | sudo –I tee /proc/sys/vm/drop_caches to the NI Linux RT. Below is the procedure for the foregoing.
- Enable the target's SSH in MAX. And then, Remotely access the NI Linux OS Shell using PuTTY. You can find step-by-step instructions on how to achieve this: How Do I Enable the Console Out on CompactRIO, Single-Board RIO, CompactFieldPoint Controllers?
- Login with admin ID, and leave password blank if not set.
- Install opkg. Enter the following two commands in order to proceed with the installation.
- opkg update
- opkg install sudo sudo-doc sudo-locale
- Access sudoers file through PuTTY. The default path is /root/etc/.
- Add lvuser permission in the sudoers file using the vi text editor. root ALL = (ALL) Add the following command below the ALL line.
- lvuser ALL=(ALL) NOPASSWD:ALL
- vi text editor Use the: wq command to save the sudoers file and exit the vi text editor.
- Enter the command using System Exec.vi in LabVIEW. Note the snippet below, and the vi must run under the target.
- Echo 3 | sudo –I tee /proc/sys/vm/drop_caches
Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.