• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Using initcall_debug to find kernel calls are taking a long time during boot in CentOS/RHEL

By admin

On CentOS/RHEL, it is sometimes complex to determine which portion of the boot sequence takes a long time. There are several different events happening during the boot sequence, and sometimes default level of logs are not sufficient to determine the component causing the issue. In that case, the steps described in this post can be used to gather more data about a possible root cause of the slow booting sequence.

1. Edit the kernel line of the matching grub menu entry in /etc/grub.conf. For example:

[...]
root (hd0,0)
kernel /vmlinuz-3.8.13-68.3.4.el6uek.x86_64 ro root=/dev/mapper/vg_ol67-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_ol67/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_ol67/lv_root KEYBOARDTYPE=pc KEYTABLE=be-latin1 rd_NO_DM rhgb quiet
[...]

And append the following parameter to it:

initcall_debug

For examples, a resulting kernel boot argument is shown below:

[...]
root (hd0,0)
kernel /vmlinuz-3.8.13-68.3.4.el6uek.x86_64 ro root=/dev/mapper/vg_ol67-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_ol67/lv_swap rd_NO_MD 
SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_ol67/lv_root KEYBOARDTYPE=pc KEYTABLE=be-latin1 rd_NO_DM rhgb quiet initcall_debug
[...]

And reboot the system, using this menu entry in the grub menu when booting.

2. After appending this parameter, both the serial console and the dmesg command output will also print the time needed for an init call to complete. For example:

calling init_autofs4_fs+0x0/0x2a [autofs4] @ 1581
initcall init_autofs4_fs+0x0/0x2a [autofs4] returned 0 after 7463 usecs

Filed Under: CentOS/RHEL

Some more articles you might also be interested in …

  1. “Couldn’t authenticate with keytab while discovering which salt to use: hostname: KDC has no support for encryption type” – error while joining domain
  2. Windows Active Directory Account Shows Inconsistent UID/GID In Different Linux SSSD Clients (CentOS/RHEL)
  3. How to Install NTP Service and Client in CentOS/RHEL 8
  4. How to Check the Size og yum Channels in CentOS/RHEL
  5. How to Create a MySQL Docker Container for Testing
  6. Beginners Guide to Managing Package Module Streams in CentOS/RHEL 8
  7. Error: Can’t open display: hostname:x.y when running xclock
  8. How to Use Udev Rules to Create oracleasm Disks in CentOS/RHEL 8
  9. “systemd-udevd: Cannot Allocate Memory” and “A start job is running for dev-mapper-\x2droot.device” – CentOS/RHEL 7 booting issue
  10. How to Configure NFS Services (server-side) to Run on Static Ports as an Alternative CentOS/RHEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • SQL script to find tables that are fragmented
  • TRUNCATE TABLE not releasing space from tablespace
  • How to reclaim entire space of an oracle database table with “Truncate Table” statement
  • Oracle SQL Script to Report Tablespace Free and Fragmentation
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary