On 05/24/15 at 11:22pm, Minfei Huang wrote:
If the grub kernel commandline is set to crashkernel=auto, it will not expand the crashkernel=auto in the /proc/cmdline. It still says crashkernel=auto.
Using /sys to determines crashkernel actual size is confusing since there is no unit of measure.
Add a new command "kdumpctl showmem" to show the reserved memory kindly.
Jeff Burke raised this issue to kdump team, and he thinks this can faciliate user to get the reserved crashkernel size in a readable way.
Patch looks good to me. Ack it.
Acked-by: Baoquan He bhe@redhat.com
Thanks Baoquan
Signed-off-by: Minfei Huang mhuang@redhat.com Acked-by: Vivek Goyal vgoyal@redhat.com
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index ca053a1..4f3c60d 100755 --- a/kdumpctl +++ b/kdumpctl @@ -551,6 +551,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{
- local mem_reserved=$(cat /sys/kernel/kexec_crash_size)
- if [ $mem_reserved -eq 0 ]
- then
echo "No memory reserved for crash kernel."
return
- fi
- echo "The kdump service reserved memory is `expr $mem_reserved / 1024 / 1024`MB"
+}
is_fadump_capable() { # Check if firmware-assisted dump is enabled @@ -924,8 +935,11 @@ main () propagate) propagate_ssh_key ;;
showmem)
show_reserved_mem
*);;
echo $"Usage: $0 {start|stop|status|restart|propagate}"
exit 1 esacecho $"Usage: $0 {start|stop|status|restart|propagate|showmem}"
}
1.9.3
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec