[PATCH v6 8/8] add a new interface to show the memory usage of 1st kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 01, 2014 at 11:15:40AM +0800, Baoquan He wrote:
> 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 %] |
> 
> ----------------------------------------------------------------------
^^^^^

Why this line is there?

> 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

So this is assuming page size 4K? If some arch is using 16K or 64K,
will it still work correctly.

Thanks
Vivek



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux