Willy Tarreau wrote:
On Thu, May 24, 2007 at 11:28:15AM +0800, gshan wrote:
This morning, I tried command "kill -7 [pid]" but didn't see the core file. Anybody has ideas?

do the following before starting your program :

# ulimit -c unlimited

You can check before and after that the core size changed from 0 to
"unlimited" :

# ulimit -a

Willy

Willy,

Thank you very much. The command "kill -7 [pid]" really works with "ulimit -c unlimited"

# /bin/sh # ps
PID   USER     COMMAND
1 0 init 2 0 [ksoftirqd/0]
   3 0        [desched/0]
   4 0        [events/0]
   5 0        [khelper]
  10 0        [kthread]
  31 0        [kblockd/0]
  60 0        [pdflush]
  61 0        [pdflush]
  63 0        [aio/0]
  62 0        [kswapd0]
  64 0        [jfsIO]
  65 0        [jfsCommit]
  66 0        [jfsSync]
  67 0        [xfslogd/0]
  68 0        [xfsdatad/0]
  69 0        [xfsbufd]
 706 0        [mtdblockd]
 730 0        -sh
 788 0        /bin/sh
 789 0        ps
# ulimit -c unlimited
# kill -7 788
Bus error (core dumped)
# ls -al
drwxr-xr-x   12 0        0               0 Jan  1 00:55 .
drwxr-xr-x   12 0        0               0 Jan  1 00:55 ..
drwxr-xr-x    2 1000     1000            0 Jan  1 00:00 bin
-rw------- 1 0 0 417792 Jan 1 00:55 core <<< Here is the corefile
drwxr-xr-x    2 0        0               0 Jan  1 00:00 dev
drwxr-xr-x    3 0        0               0 Jan  1 00:00 etc
lrwxrwxrwx    1 0        0              12 Jan  1 00:00 init -> /bin/busybox
drwxr-xr-x    2 0        0               0 Jan  1 00:00 lib
drwxr-xr-x    2 0        0               0 Jan  1 00:00 misc
dr-xr-xr-x   32 0        0               0 Jan  1 00:00 proc
drwx------    2 0        0               0 Jan  1 00:00 root
drwxr-xr-x    2 0        0               0 Jan  1 00:00 sbin
drwxr-xr-x    2 0        0               0 Jan  1 00:00 sys
drwxr-xr-x    4 0        0               0 Jan  1 00:00 usr
#

Thanks,
Gavin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to