Enable core files

On a newly installed Red Hat system, by default no core files are generated for crashed processes. To enable core files, make the following changes (as user root):

Red Hat 9

Configure the corefile size limit in the following file:

/etc/systemd/system.conf

Add or uncomment the following line and change it to “infinity” (defaults to “0:infinity”):

DefaultLimitCORE=infinity

Activate the new setting in the running kernel:

systemctl daemon-reexec

Red Hat 7/8

Configure the corefile size limit in the following file:

/etc/systemd/system.conf

Add or uncomment the following line:

DefaultLimitCORE=infinity

Add the core file pattern tunable:

/etc/sysctl.conf
kernel.core_uses_pid = 0
kernel.core_pattern = core.%E.core

Activate the core file pattern in the running kernel:

sysctl -p /etc/sysctl.conf
systemctl daemon-reexec

Verification

Restart httpd (and SKOOR Engine services, if they are already installed), then logout and login again. To test creation of core files run a kill command on the PID of the collector process:

kill -SEGV <PID>

Red Hat 9

This should create a collector core file. List available corefiles with coredumpctl:

coredumpctl
TIME                            PID UID  GID SIG     COREFILE EXE                                SIZE
Fri 2023-11-24 11:04:09 CET 1475052 989 1001 SIGSEGV present  /opt/eranger/bin/eranger-collector 1.3M

Red Hat 7/8

This should create collector core file:

ls /var/opt/run/eranger/collector/core*
core.!opt!eranger!bin!eranger-collector.core