__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/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
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| kdump-tools.conf | File | 4.46 KB | 0644 |
|
| kdump_mem_estimator | File | 783 B | 0755 |
|
| kdump_set_default | File | 2.03 KB | 0755 |
|