Scientific Linux 6 系㮠gdb ã® RPM ã« /usr/bin/gstack, /usr/bin/gcore ã¨ããã¹ã¯ãªãããå«ã¾ãã¦ããã®ãç¥ãã¾ãããã©ã¡ãã gdb ãã©ããããã·ã§ã«ã¹ã¯ãªããã§ãã (追è¨: CentOS5 ã® gdb ã«ãå
¥ã£ã¦ã¾ãã )
/usr/bin/gstack
æå®ããããã»ã¹(ãã«ãã¹ã¬ããã®å ´åã¯å ¨ã¹ã¬ãã)ã®ã¹ã¿ãã¯ãã¬ã¼ã¹ã表示ãã¾ã
- monit ã®ä¾
# /usr/bin/gstack `cat /var/run/monit.pid` Thread 2 (Thread 0x7fd3ea10a700 (LWP 27548)): #0 0x0000003cb48dea63 in poll () from /lib64/libc.so.6 #1 0x000000000041c9c7 in can_read_ms () #2 0x0000000000433107 in start_httpd () #3 0x000000000041acd8 in thread_wrapper () #4 0x0000003cb4c07851 in start_thread () from /lib64/libpthread.so.0 #5 0x0000003cb48e811d in clone () from /lib64/libc.so.6 Thread 1 (Thread 0x7fd3ea3197c0 (LWP 27546)): #0 0x0000003cb48ac3bd in nanosleep () from /lib64/libc.so.6 #1 0x0000003cb48ac230 in sleep () from /lib64/libc.so.6 #2 0x00000000004146ed in do_action () #3 0x0000000000414f81 in main ()
ã¾ã /usr/bin/pstack ã¨ããã³ãã³ããããã®ã§ãããgstack ã¸ã®ã·ã³ããªãã¯ãªã³ã¯ã¨ãªã£ã¦ãã¾ã
/usr/bin/gcore [-o filename] pid
æå®ããããã»ã¹ã®ã³ã¢ãã³ããåãã¾ã
- monit ã®ä¾
# /usr/bin/gcore -o /tmp/monit.core `cat /var/run/monit.pid` [Thread debugging using libthread_db enabled] [New Thread 0x7fd3ea10a700 (LWP 27548)] 0x0000003cb48ac3bd in nanosleep () at ../sysdeps/unix/syscall-template.S:82 82 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) Saved corefile /tmp/monit.core.27546
- ã³ã¢ã§ãã
# file /tmp/monit.core.27546 /tmp/monit.core.27546: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from '/usr/bin/monit'
ããã»ã¹ã®ã¡ã¢ãªä½¿ç¨éã«ãã£ã¦ã¯ãã¡ã¤ã«ãµã¤ãºãã ãã¶å¤§ãããªãã¨æãã®ã§è¦æ³¨æã§ãã(ã³ãã³ããå®è¡ããåã«ãµã¤ãºãã©ãè¦ç©ãããã®ããåãããªã)
ã¾ãã³ã¢ãã³ããåã£ã¦ããéã¯ããã»ã¹ã state T (ãã¬ã¼ã¹ç¶æ
) ã§åæ¢ãã¦ããã®ã§ãã®ç¹ãè¦è¦æ³¨æã
ãã®ä»
ãããã¯ã·ã§ã³ç°å¢ã§å©ç¨ãã¦ãã monit (ver 5.4.1 ) ãææãããããã¯ã®ãããªç¾è±¡ãèµ·ãããã¦ã㦠対å¿ã«å°ã£ã¦ããæ¹ãããã®ã§ããããã®ãã¼ã«ã§ä½ããã®åå 究æã«å½¹ç«ã¦ãããªãããªã¨æã£ã¦ãã¾ããã gdb ãç´ã§å©ã㦠ã¹ã¿ãã¯ãã¬ã¼ã¹ãã³ã¢ãã³ããåã£ã¦ãããæãããã¾ãããé害ã§å¿ããã±ã¼ã¹å ´åã¯ã³ãã³ãã¨ãã¦ç¨æããã¦ããã¨æ±ãã楽ã§ããã