b9e861
SUBSYSTEM=="cpu", ACTION=="online", GOTO="kdump_reload"
b9e861
SUBSYSTEM=="memory", ACTION=="online", GOTO="kdump_reload"
b9e861
SUBSYSTEM=="memory", ACTION=="offline", GOTO="kdump_reload"
b9e861
b9e861
GOTO="kdump_reload_end"
b9e861
b9e861
LABEL="kdump_reload"
b9e861
b9e861
# If kdump is not loaded, calling kdump-udev-throttle will end up
b9e861
# doing nothing, but systemd-run will always generate extra logs for
b9e861
# each call, so trigger the kdump-udev-throttler only if kdump
b9e861
# service is active to avoid unnecessary logs
b9e861
RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'"
b9e861
b9e861
LABEL="kdump_reload_end"