On 05/15/2018 01:12 PM, Bhupesh Sharma wrote:
Hello Pingfan,
On Fri, May 11, 2018 at 7:32 AM, Pingfan Liu <piliu(a)redhat.com> wrote:
> port from rhel, original patch is contributed by Minfei Huang:
Hmm, do we need to add Minfei's credentials as Suggested-by?
Do not know how to handle it. Had no way to communicate with Minfei.
Hence just doc like this.
Regards,
Pingfan
>> 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: Pingfan Liu <piliu(a)redhat.com>
>> ---
>> kdumpctl | 13 ++++++++++++-
>> kdumpctl.8 | 3 +++
>> 2 files changed, 15 insertions(+), 1 deletion(-)
>>
>> 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),
>> --
>> 2.7.4
>>
>
> Otherwise, looks ok to me:
>
> Acked-by: Bhupesh Sharma <bhsharma(a)redhat.com>
>
> Thanks,
> Bhupesh
> _______________________________________________
> kexec mailing list -- kexec(a)lists.fedoraproject.org
> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
>