How to Take FreeBSD Crash Dumps
Server
Published: 2021-02-03

Leaving this as a personal memo because I forget every time.

How to Take FreeBSD Crash Dumps

  • Add dump settings to /etc/rc.conf
dumpdev="/dev/vtbd0p3"
dumpdir="/var/crash"

Assign the swap area to dumpdev. Check the device assigned to swap with swapinfo.

# swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/vtbd0p3      4194264        0  4194264     0%

It seems dumpdev="AUTO" also works.

  • If it’s a one-time thing, you can execute it as follows:
dumpon /dev/vtbd0p3
  • Check the current settings
# dumpon -v -l
kernel dumps on vtbd0p3