gcore - get core images of running processes
# hostname
MySolaris
# ps -ef | grep -i mysql
mysql 5904 1 0 14:38:46 ? 0:03 /usr/mysql/5.0/bin/mysqld --user=mysql --datadir=/var/mysql/5.0/data --pid-file
# gcore -p 5904
gcore: core dumped
#
# ls -l core
-rw-r--r-- 1 root root 57721841 2011-10-04 15:53 core
# file core
core: ELF 32-bit LSB core file 80386 Version 1, from 'mysqld'
# mdb core
Loading modules: [ libc.so.1 ld.so.1 ]
> ::status
debugging core file of mysqld (32-bit) from MySolaris
file: /usr/mysql/5.0/bin/mysqld
initial argv: /usr/mysql/5.0/bin/mysqld --user=mysql --datadir=/var/mysql/5.0/data --pid-file
threading model: native threads
status: process core file generated with gcore(1)
> $c
libc_hwcap1.so.1`__pollsys+0x15(8047a60, 2, 0, 0)
libc_hwcap1.so.1`pselect+0x199(e, 8047c30, 0, 0, 0, 0)
libc_hwcap1.so.1`select+0x78(e, 8047c30, 0, 0, 0, 3)
handle_connections_sockets+0x324(0)
main+0x10b5(4, 8047db8, 8047dcc, 81864cd)
_start+0x7d(4, 8047e64, 8047e7e, 8047e8b, 8047ea9, 0)
> $r
%cs = 0x0043 %eax = 0x000000b7
%ds = 0x004b %ebx = 0xfeb80000
%ss = 0x004b %ecx = 0x08047a0c
%es = 0x004b %edx = 0xfeb02455 libc_hwcap1.so.1`__pollsys+0x15
%fs = 0x0000 %esi = 0xfec92a40
%gs = 0x01c3 %edi = 0x00000000
%eip = 0xfeb02455 libc_hwcap1.so.1`__pollsys+0x15
%ebp = 0x08047a48
%kesp = 0x00000000
%eflags = 0x00000286
id=0 vip=0 vif=0 ac=0 vm=0 rf=0 nt=0 iopl=0x0
status=
%esp = 0x08047a0c
%trapno = 0xe
%err = 0x4
> ::files
1 mysqld
2 crti.s
3 CCrti.s
4 crt1.o
5 crt1.s
6 fsr.s
7 values-Xa.c
8 sql_lex.cc
9 sql_handler.cc
10 item.cc
11 item_sum.cc
12 item_buff.cc
13 item_func.cc
14 item_cmpfunc.cc
15 item_strfunc.cc
16 item_timefunc.cc
17 thr_malloc.cc
18 item_create.cc
19 item_subselect.cc
20 item_row.cc
21 item_geofunc.cc
22 field.cc
23 strfunc.cc
24 key.cc
25 sql_class.cc
26 sql_list.cc
27 net_serv.cc
28 protocol.cc
>> More [
, , q, n, c, a] ? 29 sql_state.c
30 lock.cc
31 my_lock.c
32 sql_string.cc
33 sql_manager.cc
34 sql_map.cc
35 mysqld.cc
36 password.c
37 hash_filo.cc
38 hostname.cc
39 set_var.cc
40 sql_parse.cc
41 sql_yacc.cc
42 sql_base.cc
43 table.cc
44 sql_select.cc
45 sql_insert.cc
46 sql_prepare.cc
47 sql_error.cc
48 sql_locale.cc
49 sql_profile.cc
50 sql_update.cc
51 sql_delete.cc
52 uniques.cc
53 sql_do.cc
54 procedure.cc
55 item_uniq.cc
56 sql_test.cc
It will continue on and on until either all the files are listed or I quit from this command.
196 os0sync.c
>> More [
, , q, n, c, a] ? q $q
Please click on " man gcore " to see the Manual Page for this command.