Getting Solaris Live Core Dump
at Sunday, January 04, 2009
“Live core” is the crash dump of the live running Solaris system, without actually rebooting or altering the system in any way.
This requires understanding of dumpadm and savecore commands. Man pages of these commands can be found online at Sun Documentation site.
Find primary memory size:
dumpadm (1M) :
http://docs.sun.com/app/docs/doc/819-2240/dumpadm-1m?a=view
savecore (1M) :
http://docs.sun.com/app/docs/doc/816-5166/savecore-1m?a=view
-bash-3.00# prtconf | grep Memory Memory size: 8192 MegabytesGenerate the core dump device (good to have its size same as primary memory size)
-bash-3.00# mkfile -n 8G /var/crash/myhost/livecore -bash-3.00# ls -l /var/crash/myhost/ total 50 -rw-r--r-- 1 root root 3 Jan 2 04:33 bounds -rw------T 1 root root 8589934592 Jan 2 04:23 livecoreUsing dumpadm (Dump administration command), set dump device as the above generated file
-bash-3.00# dumpadm -d /var/crash/myhost/livecore Dump content: kernel pages Dump device: /var/crash/myhost/livecore (dedicated) Savecore directory: /var/crash/myhost Savecore enabled: yesGenerate live core using savecore:
-bash-3.00# savecore -L dumping to /var/crash/myhost/livecore, offset 65536, content: kernel 100% done: 564893 pages dumped, compression ratio 2.91, dump succeeded System dump time: Fri Jan 2 04:26:41 2009 Constructing namelist /var/crash/myhost/unix.29 Constructing corefile /var/crash/myhost/vmcore.29 100% done: 564893 of 564893 pages savedCore dump generated two files: vmcore.29 and unix.29.
-bash-3.00# ls -l /var/crash/myhost/ total 12284738 -rw-r--r-- 1 root root 3 Jan 2 04:33 bounds -rw------T 1 root root 8589934592 Jan 2 04:33 livecore -rw-r--r-- 1 root root 1913028 Jan 2 04:30 unix.29 -rw-r--r-- 1 root root 4675993600 Jan 2 04:33 vmcore.29
-bash-3.00# file /var/crash/myhost/vmcore.29 /var/crash/myhost/vmcore.29: SunOS 5.10 Generic_127127-11 64-bit SPARC crash dump from ''
-bash-3.00# file /var/crash/myhost/unix.29 /var/crash/myhost/unix.29: ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC1 Extensions Required, statically linked, not stripped, no debugging information availableMan pages online:
http://docs.sun.com/app/docs/doc/819-2240/dumpadm-1m?a=view
http://docs.sun.com/app/docs/doc/816-5166/savecore-1m?a=view





7/18/2009 10:24:00 AM
It was useful in debugging a system hang.
7/25/2009 03:42:00 PM
I had to get live core dump for debugging an issue with the OS. At that time, I didn't find a page explaining in simple way like this.