How to configure Linux to generate CORE files in the case of Spectrum crashing
search cancel

How to configure Linux to generate CORE files in the case of Spectrum crashing

book

Article ID: 124256

calendar_today

Updated On: 10-09-2023

Products

Spectrum Network Observability

Issue/Introduction

Tech doc explaining how to enable the creation of core files when crash occurs on Linux
 
After a crash with Spectrum installed on Linux no core file was created. How can CORE file creation be enabled on Linux for crashes?

Environment

DX NetOps Spectrum all releases running on Linux

Resolution

To turn on application core file creation, run the following:

ulimit -c unlimited 

This will turn on core files with unlimited size. 

To display the current ulimit settings, run:

ulimit –a

For example, the following shows that Core files are enabled; size unlimited:

[RedHatServer]$ ulimit –a

core file size (blocks, -c) unlimited 

data seg size (kbytes, -d) unlimited

file size (blocks, -f) unlimited

pending signals (-i) 1024

max locked memory (kbytes, -l) 32


To disable application core file creation, run:

ulimit -c 0 

NOTE: To enable this setting for all users permanently add the 'ulimit -c unlimited' command to the System File:

/etc/profile

Users will be required to logout and then back on for the /etc/profile setting to take effect

Additional Information

Alternatively, the Red Hat Linux method of setting ulimit is slightly different and can be seen here.

Red Hat Linux Ulimit Recommendation setting

You can test if a core file is created by running the following command where <PID> is the process id of the Spectrum process.

kill -SIGABRT <PID>

For example, if the process id of the SpectroSERVER process is 1234, then the command will be as follows:

kill -SIGABRT 1234

If working as expected, a core file named "core.1234" should be created in the $SPECROOT/SS directory.

NOTE: This will kill the process associated with the process id. So if running against the SpectroSERVER process, be sure to have a good SSdb backup to reload.