diff --git a/kdumpctl b/kdumpctl index cebca36..1279d72 100755 --- a/kdumpctl +++ b/kdumpctl @@ -830,6 +830,14 @@ propagate_ssh_key() fi } +show_reserved_mem() +{ + local mem=3D$(cat /sys/kernel/kexec_crash_size) + local mem_mb=3D$(expr $mem / 1024 / 1024) + + echo "Reserved "$mem_mb"MB memory for crash kernel" +} + handle_mode_switch() { if [ "$DEFAULT_DUMP_MODE" == "fadump" ]; then @@ -1246,8 +1254,11 @@ main () propagate) propagate_ssh_key ;; + showmem) + show_reserved_mem + ;; *) - echo $"Usage: $0 {start|stop|status|restart|propagate}" + echo $"Usage: $0 {start|stop|status|restart|propagate|showmem}" exit 1 esac } diff --git a/kdumpctl.8 b/kdumpctl.8 index b446b81..023562b 100644 --- a/kdumpctl.8 +++ b/kdumpctl.8 @@ -35,6 +35,9 @@ Is equal to .I propagate Helps to setup key authentication for ssh storage since it's impossible to use password authentication during kdump. +.TP +.I showmem +Prints the size of reserved memory for crash kernel in megabytes. .SH "SEE ALSO" .BR kdump.conf (5),