微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Ubuntu开启core dump

Ubuntu的认不开启core dump。如果需要临时开启,用下面的命令。

ulimit -c unlimited
echo 1 > /proc/sys/kernel/core_uses_pid

如果需要开机就认开启core dump,需要修改/etc/rc.local文件,注意文件修改的位置,我在头部加的

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

ulimit -c unlimited
echo 1 > /proc/sys/kernel/core_uses_pid

if [ -x /bin/plymouth ]; then plymouth message --text='Installing VMware Tools. Please wait...'; else chvt 2 </dev/tty0 >/dev/tty0; fi
cd /opt/vmware-tools-installer
./run_upgrader.sh
mv /etc/rc.local.backup /etc/rc.local
mv /etc/issue.backup /etc/issue
mv /opt/vmware-tools-installer/S*gdm /etc/rc2.d/ 2>/dev/null || true
mv /opt/vmware-tools-installer/S*kdm /etc/rc2.d/ 2>/dev/null || true
mv /opt/vmware-tools-installer/S*kdm-kde4 /etc/rc2.d/ 2>/dev/null || true
mv /opt/vmware-tools-installer/*dm.conf /etc/init/ 2>/dev/null || true
rm -rf /opt/vmware-tools-installer
chvt 1 < /dev/tty0 > /dev/tty0
(/sbin/initctl start lightdm || /sbin/initctl start gdm || /etc/init.d/gdm restart || /etc/init.d/kdm restart || /etc/init.d/kdm-kde4 restart) 2>/dev/null

原文地址:https://www.jb51.cc/ubuntu/351523.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐