Skip to content

Instantly share code, notes, and snippets.

@marshallmassengill
Created August 24, 2017 17:46
Show Gist options
  • Save marshallmassengill/05c8fc02067c0677bc3fe2d299322292 to your computer and use it in GitHub Desktop.
Save marshallmassengill/05c8fc02067c0677bc3fe2d299322292 to your computer and use it in GitHub Desktop.
RoboRIO Swap Directions
Plug your USB device into the RoboRIO's USB Port like so:
http://i.imgur.com/LKv2js1l.jpg
Run the command "dmesg" and find out where the device is assigned (Example: /dev/sda).
You may need to setup a swap filesystem on the device. If you do then use fdisk (Example: "fdisk /dev/sda") to clear the existing partition table on the device and assign a clean partition of type Linux Swap (82) to the device's new partitions. In our case, after deleting the existing partition table and then creating a new partition (/dev/sda1).
You can then use mkswap on the device: "mkswap /dev/sda1". This sets up a swap area on the device.
You can then use swapon to enable the OS that the swap space is available to use (Example: "swapon /dev/sda1").
You can also use swapoff to disable the swap space (Example: "swapoff /dev/sda1").
Other useful commands for swap space:
"free -k" - Useful for seeing used swap space
"cat /proc/sys/vm/swappiness" - View the current swapiness parameter
"echo 90 > /proc/sys/vm/swappiness" - Change the swapiness parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment