On 06/16/15 at 04:33pm, Dave Young wrote:
On 06/15/15 at 11:05am, 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.
>
> Signed-off-by: Minfei Huang <mhuang(a)redhat.com>
> Acked-by: Vivek Goyal <vgoyal(a)redhat.com>
> Acked-by: Baoquan He <bhe(a)redhat.com>
> ---
> v1:
> - modify the function structure
> ---
> kdumpctl | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/kdumpctl b/kdumpctl
> index ca053a1..4f47ba0 100755
> --- a/kdumpctl
> +++ b/kdumpctl
> @@ -551,6 +551,14 @@ propagate_ssh_key()
> fi
> }
>
> +show_reserved_mem()
> +{
> + local mem=$(cat /sys/kernel/kexec_crash_size)
> + local mem_mb=$(expr $mem / 1024 / 1024)
> +
> + echo "Crash kernel reserved "$mem_mb"MB memory"
Minfei, sorry, I think my suggestion of above message was wrong,
"Reserved "$mem_mb"MB memory for crash kernel" should be right..
Otherwise I'm fine.
Ok. Thanks.
I will modify the patch to repost it.
Thanks
Minfei
> +}
> +
> is_fadump_capable()
> {
> # Check if firmware-assisted dump is enabled
> @@ -924,8 +932,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
> }
> --
> 2.1.0
>