how to disable xxxx.core generating in freebsd14.2 ?

Dear all:
i have a freebsd14.2 in my pc . and configure below content in my pc .
1. /etc/rc.conf
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
2. /boot/loader.conf
#disable coredump
kern.coredump=0

but , my system always generate xxx.core in my different folder. i want to stop this.
1. how to stop this xxxx.core generating in any time.
2. what is the xxxx.core file ? how to read it with sometools, what is the function about xxxx.core file ?
thanks.
 
You can also put ulimit -c 0 in ~/.profile to disable core dumps on a by user basis. I do this, allowing root but disallowing my personal account.

You can also set this in login.conf with the coredumpsize option.

Another option would be sysctl kern.corefile=/dev/null
 
2. what is the xxxx.core file ? how to read it with sometools, what is the function about xxxx.core file ?

You can use it in a debugger to investigate what the program was doing at the time of its death.

Generally it is better to track down why you are crashing programs (usually in segmentation faults) instead of suppressing the core files. The debugging helps with this, obviously.

As people said, use `ulimit -c 0`. You can also set it as a systemwide default for all users in /etc/login.conf
 
Generally it is better to track down why you are crashing programs (usually in segmentation faults) instead of suppressing the core files.
In general you're right.
But if you cannot read a coredump because you're just a simple user, not a programmer versed with the according system's details, all you see when you look at a coredump is incomprehandable gibberish.
So it's just wasted space on your drive.
But I also agree to generally turn them off completely is not a good idea.
Reason 1: Especially when they occur often/regulary your system needs to be checked - something is wrong then.
Some other may get a clue from it, what might be the source of the problem.
Reason 2: This is one of those classic traps you may run into yourself some day.
You become more versed, might take a look at a coredump yourself, but wondering, searching, cursing where the fu... until you realize, you switched them off yourself long ago, forgot about it, and now there is none. 😁
Better delete them manually when they occur.

how to read it with sometools
I recently learned myself by tingo:
crash(8) and crashinfo(8) may something useful for that.
 
In general you're right.
But if you cannot read a coredump because you're just a simple user, not a programmer versed with the according system's details, all you see when you look at a coredump is incomprehandable gibberish.
So it's just wasted space on your drive.
But I also agree to generally turn them off completely is not a good idea.
Reason 1: Especially when they occur often/regulary your system needs to be checked - something is wrong then.
Some other may get a clue from it, what might be the source of the problem.
Reason 2: This is one of those classic traps you may run into yourself some day.
You become more versed, might take a look at a coredump yourself, but wondering, searching, cursing where the fu... until you realize, you switched them off yourself long ago, forgot about it, and now there is none. 😁
Better delete them manually when they occur.


I recently learned myself by tingo:
crash(8) and crashinfo(8) may something useful for that.
DEAr maturin :
thanks for your help . i have running below command :
crashinfo ibus-extension-gtk3.core
Unable to determine dump number from vmcore file ibus-extension-gtk3.core.
nothing we can saw. . if i want to see ibus error. crashinfo can't do that . thanks
 
Dear all:
i have configure below inform
2. /boot/loader.conf
#disable coredump
kern.coredump=0

then reboot system. when i run
sysctl kern.coredump
kern.coredump: 1
why the kern.coredump was still equip =1 ? thanks. please show me how to do that ?
 
that line goes into /etc/sysctl.conf — you have it in /boot/loader.conf, which is not the correct location. also crashinfo is for kernel panic crash dumps, not application core files. you use lldb to load a core file.
 
that line goes into /etc/sysctl.conf — you have it in /boot/loader.conf, which is not the correct location. also crashinfo is for kernel panic crash dumps, not application core files. you use lldb to load a core file.
Dear atax1a :
thanks for your help . i have modify kernel about keyboard as below in /boot/loader.conf
kern.vt.kbd_reboot=0
. why this item was working ? please let me know which kernel values will put in /etc/sysctl.conf ,which will put in /boot/loader.conf ? thanks.
 
whether a setting goes in loader.conf or sysctl.conf depends entirely on the setting, and is usually documented in the manpage for the responsible kernel component. per vt(4) that particular setting is honored in both files. some other vt settings are not.
 
Back
Top