博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
coredump位置修改
阅读量:2226 次
发布时间:2019-05-09

本文共 1735 字,大约阅读时间需要 5 分钟。

To change the location of the newly created core files, you have to change the content of /proc/sys/kernel/core_pattern:

Code:
sudo echo /tmp/core > /proc/sys/kernel/core_pattern

this will put the core dumps in /tmp, naming them "core". You can also add some modifiers to the content of the above, to customize the name of the core file, for example:

Code:
sudo echo /tmp/core.%u.%p > /proc/sys/kernel/core_pattern

will add the user ID of the owner of the process and the PID of the process itself. Other modifiers are available. See man 5 core for details.

Ah, just forgotten... by modifying a value under /proc you will lost changes upon reboot. To make them permanent, you can edit the file /etc/sysctl.conf, for example by adding the following lines

Code:
# Setup a directory to save core files intokernel.core_pattern = /tmp/core
I've had a few core dumps since I made these changes, and they don't seem to be effecting the placement of core files.
I have "
kernel.core_pattern = /tmp/core" in /etc/
sysctl.conf, /proc/sys/kernel/core_pattern is: "|/usr/share/apport/apport "
I would really like to get these buggers in /tmp, as they are quite large.
Strange. If you did not reboot the machine after the modification of /etc/
sysctl.conf, the change has not been applied. Have you manually modified the content of /proc/sys/kernel/core_pattern using the echo command?
Code:
sudo echo /tmp/core > /proc/sys/kernel/core_pattern
yes this command does the trick (well, I have to su in, it doesn't work with sudo because of the > redirection thing), but as you said, it does not stick after a reboot.
"
kernel.core_pattern = /tmp/core" doesn't seem to change this.
 

转载于:https://www.cnblogs.com/SophiaTang/archive/2013/04/14/3020145.html

你可能感兴趣的文章
一个 tflearn 情感分析小例子
查看>>
attention 机制入门
查看>>
手把手用 IntelliJ IDEA 和 SBT 创建 scala 项目
查看>>
GAN 的 keras 实现
查看>>
AI 在 marketing 上的应用
查看>>
Logistic regression 为什么用 sigmoid ?
查看>>
Logistic Regression 为什么用极大似然函数
查看>>
SVM 的核函数选择和调参
查看>>
LightGBM 如何调参
查看>>
用 TensorFlow.js 在浏览器中训练神经网络
查看>>
cs230 深度学习 Lecture 2 编程作业: Logistic Regression with a Neural Network mindset
查看>>
梯度消失问题与如何选择激活函数
查看>>
为什么需要 Mini-batch 梯度下降,及 TensorFlow 应用举例
查看>>
为什么在优化算法中使用指数加权平均
查看>>
什么是 Q-learning
查看>>
用一个小游戏入门深度强化学习
查看>>
5 分钟入门 Google 最强NLP模型:BERT
查看>>
初探Java设计模式4:一文带你掌握JDK中的设计模式
查看>>
初探Java设计模式5:一文了解Spring涉及到的9种设计模式
查看>>
Java集合详解1:一文读懂ArrayList,Vector与Stack使用方法和实现原理
查看>>