Ubuntu Generate Core Dump On Fly

Ubuntu Generate Core Dump On Fly

systemctl disable apport.service

/etc/security/limits.conf

* soft core unlimited
* hard core unlimited

/etc/sysctl.conf
kernel.core_pattern=/cores/core.%e.%p.%h.%t
mkdir /cores
chmod a+rwx /cores

sysctl -p

int main() {
    int *p;
    return *p;
}

gcc -o t t.c
.\t

Coredump will be generated at /cores
core.t.1219.u01.1570927314


Share Tweet Send
0 Comments
Loading...
You've successfully subscribed to Unofficial Azure Club
Great! Next, complete checkout for full access to Unofficial Azure Club
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.