[opensuse] Where does mysqld write a core file?
I've been trying to make mysqld write a coredump following a crash, and this morning I finally succeeded - according to mysqld.log anyway. It clearly says "Writing a core file" - but where to? I've checked the datadir /var/lib/mysql, whereelse might it be? /Per -- Per Jessen, Zürich (23.1°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Per Jessen wrote:
I've been trying to make mysqld write a coredump following a crash, and this morning I finally succeeded - according to mysqld.log anyway. It clearly says "Writing a core file" - but where to? I've checked the datadir /var/lib/mysql, whereelse might it be?
google? http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_cor... ... The name and location of the core file is system dependent. On Linux, a core file named core.pid is written to the current working directory of the process, which for mysqld is the data directory. pid represents the process ID of the server process. ... time for more coffee? :) Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 23 of July 2009, Per Jessen wrote:
I've been trying to make mysqld write a coredump following a crash, and this morning I finally succeeded - according to mysqld.log anyway. It clearly says "Writing a core file" - but where to? I've checked the datadir /var/lib/mysql, whereelse might it be?
/Per
Check /proc/sys/kernel/core_pattern. Regards -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
auxsvr@gmail.com wrote:
On Thursday 23 of July 2009, Per Jessen wrote:
I've been trying to make mysqld write a coredump following a crash, and this morning I finally succeeded - according to mysqld.log anyway. It clearly says "Writing a core file" - but where to? I've checked the datadir /var/lib/mysql, whereelse might it be?
/Per
Check /proc/sys/kernel/core_pattern.
Thanks, but that only tells me the filename, not the directory. And yes, I _have_ done a find for core*. /Per -- Per Jessen, Zürich (26.1°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 23 of July 2009, Per Jessen wrote:
auxsvr@gmail.com wrote:
On Thursday 23 of July 2009, Per Jessen wrote:
I've been trying to make mysqld write a coredump following a crash, and this morning I finally succeeded - according to mysqld.log anyway. It clearly says "Writing a core file" - but where to? I've checked the datadir /var/lib/mysql, whereelse might it be?
/Per
Check /proc/sys/kernel/core_pattern.
Thanks, but that only tells me the filename, not the directory. And yes, I _have_ done a find for core*.
/Per
Then set the directory by writing to this file. For example, echo /cores/core > /proc/sys/kernel/core_pattern make core files reside in /cores/. Also don't forget echo 1 > /proc/sys/kernel/core_uses_pid. Regards. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
auxsvr@gmail.com wrote:
On Thursday 23 of July 2009, Per Jessen wrote:
auxsvr@gmail.com wrote:
On Thursday 23 of July 2009, Per Jessen wrote:
I've been trying to make mysqld write a coredump following a crash, and this morning I finally succeeded - according to mysqld.log anyway. It clearly says "Writing a core file" - but where to? I've checked the datadir /var/lib/mysql, whereelse might it be?
/Per
Check /proc/sys/kernel/core_pattern.
Thanks, but that only tells me the filename, not the directory. And yes, I _have_ done a find for core*.
/Per
Then set the directory by writing to this file. For example, echo /cores/core > /proc/sys/kernel/core_pattern make core files reside in /cores/. Also don't forget echo 1 > /proc/sys/kernel/core_uses_pid.
Okay, that might be worth a try, but I'd really like to get hold of the core from this morning - I've already waited a couple of weeks for it. /Per -- Per Jessen, Zürich (25.1°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Per Jessen wrote:
auxsvr@gmail.com wrote:
Then set the directory by writing to this file. For example, echo /cores/core > /proc/sys/kernel/core_pattern make core files reside in /cores/. Also don't forget echo 1 > /proc/sys/kernel/core_uses_pid.
Okay, that might be worth a try, but I'd really like to get hold of the core from this morning - I've already waited a couple of weeks for it.
Well, it looks like mysqld just didn't write a core dump after all. After googling some more, I'm beginning to think it's about permissions, so I've now set up this: mkdir /tmp/corefiles chmod 777 /tmp/corefiles echo "/tmp/corefiles/core" > /proc/sys/kernel/core_pattern I've also got: /proc/sys/fs/suid_dumpable = 2 # my.cnf [mysqld] core-file [mysqld_safe] core-file-size = unlimited /Per -- Per Jessen, Zürich (17.7°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 24 of July 2009, Per Jessen wrote:
Per Jessen wrote:
auxsvr@gmail.com wrote:
Then set the directory by writing to this file. For example, echo /cores/core > /proc/sys/kernel/core_pattern make core files reside in /cores/. Also don't forget echo 1 > /proc/sys/kernel/core_uses_pid.
Okay, that might be worth a try, but I'd really like to get hold of the core from this morning - I've already waited a couple of weeks for it.
Well, it looks like mysqld just didn't write a core dump after all. After googling some more, I'm beginning to think it's about permissions, so I've now set up this:
mkdir /tmp/corefiles chmod 777 /tmp/corefiles echo "/tmp/corefiles/core" > /proc/sys/kernel/core_pattern
I've also got:
/proc/sys/fs/suid_dumpable = 2
# my.cnf [mysqld] core-file
[mysqld_safe] core-file-size = unlimited
You'll also need to set ulimit accordingly, see man 5 core for a list of settings that usually prevent core dumps. Regards -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
auxsvr@gmail.com wrote:
On Friday 24 of July 2009, Per Jessen wrote:
Per Jessen wrote:
auxsvr@gmail.com wrote:
Then set the directory by writing to this file. For example, echo /cores/core > /proc/sys/kernel/core_pattern make core files reside in /cores/. Also don't forget echo 1 > /proc/sys/kernel/core_uses_pid.
Okay, that might be worth a try, but I'd really like to get hold of the core from this morning - I've already waited a couple of weeks for it.
Well, it looks like mysqld just didn't write a core dump after all. After googling some more, I'm beginning to think it's about permissions, so I've now set up this:
mkdir /tmp/corefiles chmod 777 /tmp/corefiles echo "/tmp/corefiles/core" > /proc/sys/kernel/core_pattern
I've also got:
/proc/sys/fs/suid_dumpable = 2
# my.cnf [mysqld] core-file
[mysqld_safe] core-file-size = unlimited
You'll also need to set ulimit accordingly,
That's already being done by the mysqld_safe script. (due to core-file-size = unlimited being set in the config). /Per -- Per Jessen, Zürich (21.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
auxsvr@gmail.com
-
Dave Howorth
-
Per Jessen