Re: query on /var/log/messages

Rohith M
Occasional Contributor

query on /var/log/messages


1. Would like to know if any logs pertaining to core dumps is seen in /var/log/messages file ? In other words, if an application dumps core, is there any message/print of log given out by the OS/kernel in /var/log/messages or any other log files?

2. Is there any way to find out when the kernel has asked the application to dump core ? any log files/messages like kill signal,etc for this scenario?

Alexander Chuzhoy
Honored Contributor

Re: query on /var/log/messages

Does the output from "dmesg" show anything?
David Child_1
Honored Contributor

Re: query on /var/log/messages

Generally there isn't going to be any entry in the messages file when an application core dumps. There might be a few exceptions if its a daemon or some OS process.

If the application itself has its own logs then a core dump might be captured there. What application(s) are you working with (or is this a more general question)?

If you are working on an ongoing problem where an application is crashing then perhaps you can trace it and capture what is going on;

strace -o /var/tmp/strace.log -f -p

Where pid is the PID of you main application process.

Note; this will dump a lot of text so if you are not able to predict when the dump might occur you will probably want to rotate the strace.log regularly.