Core Dumps in Mac OS X
来源:互联网 发布:vue.js onchange 编辑:程序博客网 时间:2024/06/10 00:28
MAC磁盘不停的变大,以下是解决方案。可能会影响某些服务,具体原因不明。
http://krypted.com/mac-os-x/core-dumps-in-mac-os-x/
Core Dumps in Mac OS X
Every now and then, OS X has to drop some kids off at the pool. Usually it’s some developer that didn’t build a sanity check for every-single-possible-flippin’-thing-you-might-think-to-do-to-his/her-poor-flippin’-app-OMGYFI! And then, suddenly, out of nowhere, you get crap all over the system. Actually, as expected, Apple’s dumps are pretty well sequestered in the /cores directory. Each core file has a number appended behind it. For example, core.9901. When applications crash, they can save a lot of information about the state when they crashed into these files. For example, I have seen cached passwords in there…
To disable core dumps, add the following line to /etc/sysctl.conf:
kern.coredump=0
After a restart core dumps will be disabled. You can also set the coredump setting to 0 to disable it live, using the sysctl command, but it will revert back to 1 at the next reboot:
sudo sysctl -w kern.coredump=0
Existing core files are removed using the following command:
sudo rm -f /cores/*
As core files actually serve a purpose, if an application or the system needs some good troubleshooting-foo, re-enable:
sudo sysctl -w kern.coredump=1
Disable core file dumps on Mac
https://blog.liplex.de/disable-core-file-dumps-on-mac/
Mac OS X is still based on UNIX. Therefore OS X uses a lot of UNIX features. One of them are core dumps which are basically file dumps of your working memory in the moment of an app crashing. It helps a developer to look into why an app crashed or for an app to retrieve the last working environment.
Recently I ran into a full hard drive and had to look into what takes up how much space. Turns out there where a lot of those core dumps. Over 145GB of them to be more exact!
They are located in your root folder at /cores
. I just deleted all of them with:
$ rm -f cores/*
You can disable the dumping of those core files with the following command:
$ sudo sysctl -w kern.coredump=0
But this won't be persisted through a restart. To do so create a new file on /etc/sysctl.conf
(if it does not exist yet) and write in the following configuration:
kern.coredump=0
- Core Dumps in Mac OS X
- mac os X生成core文件
- Taking Screenshots in Mac OS X
- Mac OS X Tiger in a Nutshell
- Mac OS X: Launchd in Depth
- CF-前缀 in Mac OS X
- Administrator Privilege in Mac OS X app
- Environment variable in Mac OS X
- .NET Core多平台开发体验[2]- Mac OS X
- .NET Core多平台开发体验[2]- Mac OS X
- Enable application and daemon core dumps in RHEL6
- Sams Teach Yourself Mac OS X Leopard All in One
- No Interfaces Available In Wireshark Mac OS X 解决办法
- No Interfaces Available In Wireshark Mac OS X
- How to Run Mac OS X in VirtualBox on Windows
- Show hide file in finder on Mac OS X
- Limit bandwidth in Mac OS X using ipfw
- Clear the “Open With” menu in Mac OS X
- 基于Echarts的销售企业经营数据分析-帕累托
- 聚集索引和非聚集索引
- IOS开发UISearchBar失去第一响应者身份后,取消按钮不执行点击事件的问题
- GitHub 排名前 100 的安卓、iOS项目简介
- DP与滚动数组
- Core Dumps in Mac OS X
- 布隆过滤器-----时间+空间
- Eclipse Python开发环境配置(PyDev插件安装)
- PyDev for Eclipse 简介
- iOS开发------通讯录分组排序(UILocalizedIndexedCollation)
- EhCache 分布式缓存/缓存集群
- mysql 插入数据失败防止自增长主键增长的方法
- Windows Socket 编程_ 简单的服务器/客户端程序
- spring mvc 学习