Less known Solaris features: About crashes and cores - Appendix B: ::status

You are logged into your system and doing a little bit of house keeping (archiving of old logfiles, deleting the rubbish on you system like backup files) and suddenly you see a core file. Heck … you wasn´t aware of the fact, that an application wrote such a file. How can you get some basic information about it? With Solaris you can use the mdb for this task. Let´s assume you find a core file at / on the system master:

# uname -a
SunOS master 5.11 snv_97 i86pc i386 i86pc
# ls -l core
-rw-r--r--   1 root     root     5073385 Oct 10 18:26 core

Now we can start the Modular Debugger mdb with the core file.

# mdb core
Loading modules: [ libc.so.1 ld.so.1 ]
>

After a short moment the mdb command will give you a prompt. Now just type in the ::status command

> ::status
debugging core file of sshd (32-bit) from master
file: /usr/lib/ssh/sshd
initial argv: /usr/lib/ssh/sshd
threading model: native threads
status: process core file generated with gcore(1)

Now you know, that you can savely ignore the file, as the system created it on your order while you was playing around with gcore.