Search code examples
linuxlinux-kernelbootloadergrubgrub2

How to get grub load/boot statistics?


Is it possible to know how much time grub takes to load files from /boot (vmlinuz and initrd) to the RAM?

As far as I know, the boot command loads and jumps into the kernel according to previous linux and initrd commands without any option to retrieve some stats about the processing.


Solution

  • Reading the source code of commands in grub's repo, I found testspeed which gives the load stats I wanted for a given file into memory:

    grub> testspeed /vmlinuz
    File size: 3.40MiB
    Elapsed time: 1.571 s
    Speed: 2.16MiB/s
    
    grub> testspeed /initrd.img
    File size: 48.80MiB
    Elapsed time: 8.762 s
    Speed: 5.57MiB/s