筆記:Ubuntu產生Core dump
 
   1. 產生執行中程序的Core Dump  gcore -o {output dump file} {process id}      輸出的檔案名稱-o指定的檔名,加上process id作為副檔名    例如:   $ gcore -o chrome_dump 8283 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". warning: Target and debugger are in different PID namespaces; thread lists and other data are likely unreliable pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225 225 ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: No such file or directory. Saved corefile chrome_dump.8283      2. 強制停止程序讓系統產生Core dump  kill -6 {process ID}  -6是SIGABRT信號,可讓process中止,如果沒效,可嘗試SIGSYS(-31)或是SIGXCPU(-24)信號   參考資料: https://www.ibm.com/support/knowledgecenter/en/SSYKE2_9.0.0/com.ibm.java.multiplatform.90.doc/diag/tools/obtaining_dump_hung_jvm.html   如果沒有在工作目錄下產生core或coredump,表示需要暫時解除限制   暫時不限制  ulimit -c unlimited   查看目前的限制狀態,若為0表示不dump,Ubuntu就是預設為0  ulimit -c    其他ulimit選項     ...
 
 
 
