| Server IP : 43.129.54.214 / Your IP : 216.73.217.113 Web Server : nginx/1.24.0 System : Linux VM-4-108-ubuntu 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/share/kdump-tools/ |
Upload File : |
#!/bin/sh
KDUMP_DIR="/var/lib/kdump"
if [ ! -x "$(command -v systemctl)" ]; then
echo "Couldn't find systemctl" 1>&2
exit 1
fi
# Notice that memory estimation would only be useful and represent the reality
# if a /proc/meminfo snapshot is collected early on boot, hence we have the
# check below - basically, we shouldn't collect the snapshot in case this
# is executed later by the users (manually or via restarting kdump-tools).
if ! systemctl is-active basic.target 1>/dev/null 2>&1; then
# It's very likely this directory is already created, but if for some
# reason it isn't, we will fail the memory estimator. So, create the
# directory anyway - if it's already there, then this is a NOP.
mkdir -p "${KDUMP_DIR}"
cat /proc/meminfo 1> "${KDUMP_DIR}/mem-$(uname -r)"
fi