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@redhat.com --- kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 70d30fa..6f27669 100755 --- a/kdumpctl +++ b/kdumpctl @@ -526,6 +526,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{ + 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 @@ -899,8 +910,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 }
On 09/22/14 at 11:24am, 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.
Hi Minfei,
I don't think this is necessary. kdumpctl is used to manage the kdump kernel load/unload, we don't need to provide another option to show how much crash memory is reserved. I think /sys/kernel/kexec_xxx is enough.
Thanks Baoquan
Signed-off-by: Minfei Huang mhuang@redhat.com
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 70d30fa..6f27669 100755 --- a/kdumpctl +++ b/kdumpctl @@ -526,6 +526,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{
- 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 @@ -899,8 +910,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.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On 09/22/2014 02:07 PM, Baoquan He wrote:
On 09/22/14 at 11:24am, 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.
Hi Minfei,
I don't think this is necessary. kdumpctl is used to manage the kdump kernel load/unload, we don't need to provide another option to show how much crash memory is reserved. I think /sys/kernel/kexec_xxx is enough.
Thanks Baoquan
The unit of /sys/kernel/kexec_xxx is B. It does not show kindly to the user.
Maybe you are right, we should not add the duplicate function in the kdumpctl script.
I will mark it to the bugzilla that it is necessary to implement this command.
Signed-off-by: Minfei Huang mhuang@redhat.com
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 70d30fa..6f27669 100755 --- a/kdumpctl +++ b/kdumpctl @@ -526,6 +526,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{
- 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
@@ -899,8 +910,11 @@ main () propagate) propagate_ssh_key ;;
showmem)
show_reserved_mem
*);;
echo $"Usage: $0 {start|stop|status|restart|propagate}"
exit 1 esac }echo $"Usage: $0 {start|stop|status|restart|propagate|showmem}"
-- 1.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On Mon, Sep 22, 2014 at 02:07:46PM +0800, Baoquan He wrote:
On 09/22/14 at 11:24am, 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.
Hi Minfei,
I don't think this is necessary. kdumpctl is used to manage the kdump kernel load/unload, we don't need to provide another option to show how much crash memory is reserved. I think /sys/kernel/kexec_xxx is enough.
Bao,
Agreed that it is not necessary. Just that it makes it easier for some people. I have a bug open for this. If it makes it easier to find how much memory is reserved, it does not harm.
Thanks Vivek
Thanks Baoquan
Signed-off-by: Minfei Huang mhuang@redhat.com
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 70d30fa..6f27669 100755 --- a/kdumpctl +++ b/kdumpctl @@ -526,6 +526,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{
- 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 @@ -899,8 +910,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.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On 09/22/14 at 11:15am, Vivek Goyal wrote:
On Mon, Sep 22, 2014 at 02:07:46PM +0800, Baoquan He wrote:
On 09/22/14 at 11:24am, 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.
Hi Minfei,
I don't think this is necessary. kdumpctl is used to manage the kdump kernel load/unload, we don't need to provide another option to show how much crash memory is reserved. I think /sys/kernel/kexec_xxx is enough.
Bao,
Agreed that it is not necessary. Just that it makes it easier for some people. I have a bug open for this. If it makes it easier to find how much memory is reserved, it does not harm.
OK, I am fine with it. Just worry other requirements also can be added into kdumpctl to make it a little mess if this is started. Anyway, I don't object to this strongly.
On Tue, Sep 23, 2014 at 10:19:35AM +0800, Baoquan He wrote:
On 09/22/14 at 11:15am, Vivek Goyal wrote:
On Mon, Sep 22, 2014 at 02:07:46PM +0800, Baoquan He wrote:
On 09/22/14 at 11:24am, 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.
Hi Minfei,
I don't think this is necessary. kdumpctl is used to manage the kdump kernel load/unload, we don't need to provide another option to show how much crash memory is reserved. I think /sys/kernel/kexec_xxx is enough.
Bao,
Agreed that it is not necessary. Just that it makes it easier for some people. I have a bug open for this. If it makes it easier to find how much memory is reserved, it does not harm.
OK, I am fine with it. Just worry other requirements also can be added into kdumpctl to make it a little mess if this is started. Anyway, I don't object to this strongly.
Ok, I am checking with Jeff Burke and see if he still like to see it. If he agrees, then we can drop it.
Thanks Vivek
On Mon, Sep 22, 2014 at 11:24:52AM +0800, 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@redhat.com
Looks good to me.
Acked-by: Vivek Goyal vgoyal@redhat.com
Vivek
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 70d30fa..6f27669 100755 --- a/kdumpctl +++ b/kdumpctl @@ -526,6 +526,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{
- 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 @@ -899,8 +910,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.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On Mon, Sep 22, 2014 at 11:24:52AM +0800, 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@redhat.com
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 70d30fa..6f27669 100755 --- a/kdumpctl +++ b/kdumpctl @@ -526,6 +526,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{
- MEM_RESERVED=$(cat /sys/kernel/kexec_crash_size)
Actually, can we make MEM_RESERVED local.
local mem_reserved.
Thanks Vivek
- 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 @@ -899,8 +910,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.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On 09/22/14 at 11:24am, 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.
How about show the value in "kdumpctl status" output?
Signed-off-by: Minfei Huang mhuang@redhat.com
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 70d30fa..6f27669 100755 --- a/kdumpctl +++ b/kdumpctl @@ -526,6 +526,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{
- 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 @@ -899,8 +910,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.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On Oct 10, 2014, at 2:14 PM, Dave Young dyoung@redhat.com wrote:
On 09/22/14 at 11:24am, 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.
How about show the value in "kdumpctl status" output?
I think it is better. We can show the reserved memory like following:
[minfei@localhost kexec-tools]$ sudo systemctl stop kdump [minfei@localhost kexec-tools]$ sudo kdumpctl status Kdump is not operational
[minfei@localhost kexec-tools]$ sudo systemctl start kdump [minfei@localhost kexec-tools]$ sudo kdumpctl status Kdump is operational (Reserved memory 128MB)
Signed-off-by: Minfei Huang mhuang@redhat.com
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 70d30fa..6f27669 100755 --- a/kdumpctl +++ b/kdumpctl @@ -526,6 +526,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{
- 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 @@ -899,8 +910,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.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On 10/10/14 at 02:41pm, Minfei Huang wrote:
On Oct 10, 2014, at 2:14 PM, Dave Young dyoung@redhat.com wrote:
On 09/22/14 at 11:24am, 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.
How about show the value in "kdumpctl status" output?
I think it is better. We can show the reserved memory like following:
[minfei@localhost kexec-tools]$ sudo systemctl stop kdump [minfei@localhost kexec-tools]$ sudo kdumpctl status Kdump is not operational
I think in this case, we'd better output how much memory we reserved as well, as the following:
Kdump is not operational (Reserved memory 128M).
[minfei@localhost kexec-tools]$ sudo systemctl start kdump [minfei@localhost kexec-tools]$ sudo kdumpctl status Kdump is operational (Reserved memory 128MB)
Signed-off-by: Minfei Huang mhuang@redhat.com
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 70d30fa..6f27669 100755 --- a/kdumpctl +++ b/kdumpctl @@ -526,6 +526,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{
- 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 @@ -899,8 +910,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.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
-- Minfei
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
On Sat, Oct 11, 2014 at 01:19:46PM +0800, WANG Chao wrote:
On 10/10/14 at 02:41pm, Minfei Huang wrote:
On Oct 10, 2014, at 2:14 PM, Dave Young dyoung@redhat.com wrote:
On 09/22/14 at 11:24am, 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.
How about show the value in "kdumpctl status" output?
I think it is better. We can show the reserved memory like following:
[minfei@localhost kexec-tools]$ sudo systemctl stop kdump [minfei@localhost kexec-tools]$ sudo kdumpctl status Kdump is not operational
I think in this case, we'd better output how much memory we reserved as well, as the following:
Kdump is not operational (Reserved memory 128M).
Initially I had thought about it. I personally prefer implementing a separate command instead of overloading "kdump status". When people do kdump status, they are more interested in figuring out if kdump is running or not. (And not necessarily amount of memory reserved).
Thanks Vivek
[minfei@localhost kexec-tools]$ sudo systemctl start kdump [minfei@localhost kexec-tools]$ sudo kdumpctl status Kdump is operational (Reserved memory 128MB)
Signed-off-by: Minfei Huang mhuang@redhat.com
kdumpctl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl index 70d30fa..6f27669 100755 --- a/kdumpctl +++ b/kdumpctl @@ -526,6 +526,17 @@ propagate_ssh_key() fi }
+show_reserved_mem() +{
- 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 @@ -899,8 +910,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.8.3.1
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
-- Minfei
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec