diff options
author | Baoquan He <bhe@redhat.com> | 2014-09-01 12:17:57 +0900 |
---|---|---|
committer | Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp> | 2014-09-02 15:22:58 +0900 |
commit | beee349efb8cad39073c261ffc30a8d7eb7731da (patch) | |
tree | 2cfde759ae87bf509000f9f4b73008f288e19933 /makedumpfile.8 | |
parent | fe88093f1158a357ed8bbbae4d1295eb8fe9b785 (diff) |
[PATCH v6 8/8] Add a new interface to show the memory usage of 1st kernel.
Recently people complained that they don't know how to decide how
much disk size need be reserved for kdump. E.g there are lots of
machines with different memory size, if the memory usage information
of current system can be shown, that can help them to make an estimate
how much storage space need be reserved.
In this patch, a new interface is added into makedumpfile. By the
help of this, people can know the page number of memory in different
use. The implementation is analyzing the "System Ram" and "kernel text"
program segment of /proc/kcore excluding the crashkernel range, then
calculating the page number of different kind per vmcoreinfo.
The print is like below:
~$ ./makedumpfile --mem-usage /proc/kcore
The kernel version is not supported.
The makedumpfile operation may be incomplete.
Excluding unnecessary pages : [100.0 %] |
----------------------------------------------------------------------
TYPE PAGES EXCLUDABLE DESCRIPTION
ZERO 28823 yes Pages filled with zero
CACHE 197932 yes Cache pages
CACHE_PRIVATE 15862 yes Cache pages + private
USER 30778 yes User process pages
FREE 3671105 yes Free pages
KERN_DATA 105168 no Dumpable kernel data
Total pages on system: 4049668
makedumpfile Completed.
BTW, in formal version of kernel which maintainer declares to support
after sufficient test, the warning message about kernel version won't
occur.
Signed-off-by: Baoquan He <bhe@redhat.com>
Diffstat (limited to 'makedumpfile.8')
-rw-r--r-- | makedumpfile.8 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/makedumpfile.8 b/makedumpfile.8 index 0f51bf2..e6a2dac 100644 --- a/makedumpfile.8 +++ b/makedumpfile.8 @@ -533,6 +533,23 @@ it is necessary to specfiy [\-x \fIVMLINUX\fR] or [\-i \fIVMCOREINFO\fR]. # makedumpfile \-\-dump-dmesg -x vmlinux /proc/vmcore dmesgfile .br + +.TP +\fB\-\-mem-usage\fR +This option is used to show the page numbers of current system in different +use. It should be executed in 1st kernel. By the help of this, user can know +how many pages is dumpable when different dump_level is specified. It analyzes +the 'System Ram' and 'kernel text' program segment of /proc/kcore excluding +the crashkernel range, then calculates the page number of different kind per +vmcoreinfo. So currently /proc/kcore need be specified explicitly. + +.br +.B Example: +.br +# makedumpfile \-\-mem-usage /proc/kcore +.br + + .TP \fB\-\-diskset=VMCORE\fR Specify multiple \fIVMCORE\fRs created on sadump diskset configuration |