Ramanujam
Ramanujam

Reputation: 249

configuring and checking core dump on Linux server

I am working on a socket server application using C in Linux as my first professional project.Being a beginner in Programming I am not much aware about Linux environment. Currently I am struck in a issue that certain times my server application crashes, I am not able to find out how to identify the reason for crash. Then I read about core dump generation. I tried implementing core dump but was unable to reach at any result.

can someone please provide some help for configuring core dump for my application and seeing the core file for reason of crash. Please provide answer in basic level as i am just a beginner.

I am using Netbeans IDE for programming.Consider my application name as Socketserver.

Thanks.

Upvotes: 0

Views: 53

Answers (1)

Arpit Aggarwal
Arpit Aggarwal

Reputation: 861

If the name of your executable is Socketserver Run the application as follows

#ulimit -c unlimited
#./Socketserver

If your application crashes, a core dump file will get generated in the directory from where you are executing the code. You can than analyse the core dump file with gdb as follows :

gdb Socketserver <core file name>

Then you can use basic gdb commands like bt, print, frame etc to analyze the problem.

Upvotes: 1

Related Questions