toolshed v0.2.10 Toolshed.Nerves
Helpers that are useful on Nerves devices
Helpers include:
Link to this section Summary
Functions
Print out kernel log messages
Validate a firmware image
Print out the loaded kernel modules
Shortcut to reboot a board. This is a graceful reboot, so it takes some time before the real reboot.
Reboot immediately without a graceful shutdown. This is for the impatient.
Print out information about the running software
Link to this section Functions
dmesg()
dmesg() :: :"do not show this result in output"
dmesg() :: :"do not show this result in output"
Print out kernel log messages
fw_validate()
fw_validate() :: :ok | {:error, String.t()}
fw_validate() :: :ok | {:error, String.t()}
Validate a firmware image
All official Nerves Systems automatically validate newly installed firmware. For some systems, it's possible to disable this so that new firmware gets one chance to boot. If it's not "validated" before a reboot, then the device reverts to the old firmware.
lsmod()
lsmod() :: :"do not show this result in output"
lsmod() :: :"do not show this result in output"
Print out the loaded kernel modules
Aside from printing out whether the kernel has been tainted, the Linux utility of the same name just dump the contents of "/proc/modules" like this one.
Some kernel modules may be built-in to the kernel image. To see
those, run cat "/lib/modules/x.y.z/modules.builtin"
where x.y.z
is
the kernel's version number.
reboot()
reboot() :: no_return()
reboot() :: no_return()
Shortcut to reboot a board. This is a graceful reboot, so it takes some time before the real reboot.
reboot!()
reboot!() :: no_return()
reboot!() :: no_return()
Reboot immediately without a graceful shutdown. This is for the impatient.
uname()
uname() :: :"do not show this result in output"
uname() :: :"do not show this result in output"
Print out information about the running software
This is similar to the Linux uname
to help people remember what to type.