Re: [PATCH] add option --printsize

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

 



On 05/21/2012 04:50 PM, Harald Hoyer wrote:

> Am 21.05.2012 10:43, schrieb Cong Wang:
>> On 05/21/2012 04:37 PM, Dave Young wrote:
>>> Add --printsize for measuring module installed size to initramfs
>>>
>> ...
>>> +
>>> +        #print the module install size
>>> +        if [ -n "$printsize" ]; then
>>> +            _isize_new=$(du -sk ${initdir}|cut -f1)
>>> +            _isize_delta=$(($_isize_new - $_isize))
>>> +            echo "$_d_mod install size: ${_isize_delta}k"
>>> +            _isize=$_isize_new
>>> +        fi
>>>       fi
>>
>> Yeah, it is a nice feature, to calculate the module installation size by delta
>> of the whole initrd size.
>>
>> Could you include the sample output in the changelog?


Hi cong, I just reply here of a sample, will add it if need a v2 patch:

[dave@localhost dracut]$ ./dracut.sh -l --printsize test.img 2>/dev/null
dash install size: 2372k
caps install size: 1148k
i18n install size: 3144k
rpmversion install size: 4k
network install size: 8688k
ifcfg install size: 8k
plymouth install size: 26000k
btrfs install size: 336k
crypt install size: 2572k
dm install size: 252k
dmraid install size: 356k
kernel-modules install size: 55548k
lvm install size: 2016k
mdraid install size: 800k
multipath install size: 748k
fcoe install size: 780k
iscsi install size: 520k
nfs install size: 22096k
resume install size: 12k
rootfs-block install size: 12k
terminfo install size: 60k
udev-rules install size: 956k
virtfs install size: 380k
biosdevname install size: 92k
usrmount install size: 4k
base install size: 1348k
fs-lib install size: 2324k
shutdown install size: 396k

>>
>> Thanks.
> 
> What about files used by many modules, like shared libraries and tools? The
> output should be taken with a grain of salt.


This rough printing at least can help use measure the module install
size which is not shared. It is the increased size directly caused by
the specific module_install.

Shared libraries is not considered here. It's hard to measure the shared
part.. Do you have any idea or suggestions?

> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks
Dave
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux