冰澜

  • 首页

  • 标签

  • 归档

  • 搜索

Linux core 设置

发表于 2016-09-25 | 更新于 2018-09-23 | | 阅读次数:

linux 程序异常退出时,内核会生成 core 文件,通过 GDB 查看 core 文件可以定位程序异常退出时候的堆栈信息,指示出错的位置。

查看 core 文件是否打开

1
$ ulimit -c

如果结果为0,则表示系统关闭了该功能

开启 core

在当前 shell 设置

1
$ ulimit -c unlimited

为整个用户设置

1
$ cat ulimit-c unlimited > ~/.zshrc && source ~/.zshrc

core 设置

文件名是否带pid标识

1
$ echo "1" > /proc/sys/kernel/core_uses_pid

core 文件格式为 corename_with_format.pid

1
$ echo "0" > /proc/sys/kernel/core_uses_pid

core 文件格式为 corename_with_format

保存位置及格式设置

查看当前设置

1
$ cat /proc/sys/kernel/core_pattern

位置及格式

1
$ echo "/corefile_path/core-%e-%p-%t" > /proc/sys/kernel/core_pattern

阅读全文 »

Hexo Qucik Start

发表于 2016-09-20 | 更新于 2018-09-23 | | 阅读次数:

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate
阅读全文 »
123
anyfeel

anyfeel

我就是我,是颜色不一样的烟花

22 日志
7 标签
© 2015 – 2019 anyfeel
由 Hexo 强力驱动 v3.7.1
|
主题 – NexT.Pisces v6.4.2