张拓 2010-10-11 strace -o asterisk.txt asterisk asteriks.txt 代码如下 execve("/usr/sbin/asterisk", ["asterisk"], [/* 21 vars */]) = 0 brk(0) = 0x978c000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=37343, ...}) = 0 mmap2(NULL, 37343, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7efe000 close(3) = 0 open("/lib/libssl.so.6", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/20+q/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=293300, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efd000 mmap2(0x707000, 294376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x707000 mmap2(0x74b000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x43) = 0x74b000 close(3) = 0 open("/lib/libcrypto.so.6", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0` O/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1317092, ...}) = 0 mmap2(0x4bf000, 1332800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4bf000 mmap2(0x5ee000, 77824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12e) = 0x5ee000 mmap2(0x601000, 13888, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x601000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/340o/21/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1705688, ...}) = 0 mmap2(0x101000, 1422788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x101000 mmap2(0x257000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x156) = 0x257000 mmap2(0x25a000, 9668, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x25a000 close(3) = 0 open("/usr/lib/libxml2.so.2", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/200/33/2/0064/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=1250176, ...}) = 0 mmap2(0x6007000, 1251156, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x6007000 mmap2(0x6133000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12c) = 0x6133000 mmap2(0x6138000, 1876, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x6138000 close(3) = 0 open("/usr/lib/libz.so.1", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/300/5/332/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=75028, ...}) = 0 mmap2(0xd9f000, 76400, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xd9f000 mmap2(0xdb1000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11) = 0xdb1000 close(3) = 0 open("/lib/libm.so.6", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/20/304/325/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=216500, ...}) = 0 mmap2(0xd59000, 163952, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xd59000 mmap2(0xd80000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26) = 0xd80000 close(3) = 0 open("/lib/libdl.so.2", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0p*/325/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=20668, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efc000 mmap2(0xd52000, 16504, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xd52000 mmap2(0xd55000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xd55000 close(3) = 0 open("/lib/libcap.so.1", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/260/330A/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=11560, ...}) = 0 mmap2(0x41d000, 13684, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x41d000 mmap2(0x420000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0x420000 close(3) = 0 open("/lib/libpthread.so.0", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/260/207/330/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=133524, ...}) = 0 mmap2(0xd84000, 98788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xd84000 mmap2(0xd99000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xd99000 mmap2(0xd9b000, 4580, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xd9b000 close(3) = 0 open("/lib/libtermcap.so.2", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/320*@/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=13084, ...}) = 0 mmap2(0x402000, 14568, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x402000 mmap2(0x405000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0x405000 close(3) = 0 open("/lib/libresolv.so.2", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/20/361E/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=80680, ...}) = 0 mmap2(0x45d000, 80072, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x45d000 mmap2(0x46d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf) = 0x46d000 mmap2(0x46f000, 6344, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x46f000 close(3) = 0 open("/lib/libgcc_s.so.1", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0`/6/334/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=46636, ...}) = 0 mmap2(0xdbf000, 48196, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xdbf000 mmap2(0xdca000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa) = 0xdca000 close(3) = 0 open("/usr/lib/libgssapi_krb5.so.2", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/320/223m/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=190712, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efb000 mmap2(0x6d2000, 187804, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x6d2000 mmap2(0x6ff000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2d) = 0x6ff000 close(3) = 0 open("/usr/lib/libkrb5.so.3", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0`/261d/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=612180, ...}) = 0 mmap2(0x63a000, 613256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x63a000 mmap2(0x6cd000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x92) = 0x6cd000 close(3) = 0 open("/lib/libcom_err.so.2", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/340/247K/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=7748, ...}) = 0 mmap2(0x4ba000, 9164, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x4ba000 mmap2(0x4bc000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x4bc000 close(3) = 0 open("/usr/lib/libk5crypto.so.3", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/220Wa/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=157304, ...}) = 0 mmap2(0x612000, 155040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x612000 mmap2(0x637000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25) = 0x637000 close(3) = 0 open("/usr/lib/libkrb5support.so.0", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0`/211`/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=33712, ...}) = 0 mmap2(0x607000, 34884, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x607000 mmap2(0x60f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7) = 0x60f000 close(3) = 0 open("/lib/libkeyutils.so.1", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0/20(p/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=7880, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efa000 mmap2(0x702000, 9208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x702000 mmap2(0x704000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0x704000 close(3) = 0 open("/lib/libselinux.so.1", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0000/265>/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=93508, ...}) = 0 mmap2(0x3e8000, 97112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3e8000 mmap2(0x3fe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15) = 0x3fe000 close(3) = 0 open("/lib/libsepol.so.1", O_RDONLY) = 3 read(3, "/177ELF/1/1/1/0/0/0/0/0/0/0/0/0/3/0/3/0/1/0/0/0@/:/0004/0/0/0"..., 512) = 512 fstat64(3, {st_mode=S_IFREG|0755, st_size=245376, ...}) = 0 mmap2(0x3a0000, 285024, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x3a0000 mmap2(0x3db000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3b) = 0x3db000 mmap2(0x3dc000, 39264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x3dc000 close(3) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ef9000 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ef8000 set_thread_area({entry_number:-1 -> 6, base_addr:0xb7ef86d0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 mprotect(0x257000, 8192, PROT_READ) = 0 mprotect(0xd80000, 4096, PROT_READ) = 0 mprotect(0xd55000, 4096, PROT_READ) = 0 mprotect(0xd99000, 4096, PROT_READ) = 0 mprotect(0x46d000, 4096, PROT_READ) = 0 mprotect(0x39c000, 4096, PROT_READ) = 0 munmap(0xb7efe000, 37343) = 0 set_tid_address(0xb7ef8718) = 26368 set_robust_list(0xb7ef8720, 0xc) = 0 futex(0xbfbff524, FUTEX_WAKE_PRIVATE, 1) = 0 rt_sigaction(SIGRTMIN, {0xd88370, [], SA_SIGINFO}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {0xd88280, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0 rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY}) = 0 uname({sys="Linux", node="localhost.localdomain", ...}) = 0 access("/etc/selinux/", F_OK) = 0 brk(0) = 0x978c000 brk(0x97ad000) = 0x97ad000 open("/etc/selinux/config", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=447, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f07000 read(3, "# This file controls the state o"..., 4096) = 447 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7f07000, 4096) = 0 open("/proc/mounts", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f07000 read(3, "rootfs / rootfs rw 0 0/n/dev/root"..., 4096) = 368 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7f07000, 4096) = 0 geteuid32() = 0 uname({sys="Linux", node="localhost.localdomain", ...}) = 0 gettimeofday({1286764889, 320714}, NULL) = 0 futex(0x81afea0, FUTEX_WAKE_PRIVATE, 2147483647) = 0 gettimeofday({1286764889, 320805}, NULL) = 0 open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 3 stat64("/etc/asterisk/asterisk.conf", {st_mode=S_IFREG|0775, st_size=367, ...}) = 0 open("/etc/asterisk/asterisk.conf", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0775, st_size=367, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f07000 read(4, "[directories]/nastetcdir => /etc/"..., 4096) = 367 read(4, "", 4096) = 0 close(4) = 0 munmap(0xb7f07000, 4096) = 0 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4 ioctl(4, SIOCGIFHWADDR, {ifr_name="eth0", ifr_hwaddr=90:fb:a6:0f:9b:09}) = 0 close(4) = 0 rt_sigaction(SIGCHLD, {0x8070c10, [], SA_RESTART}, NULL, 8) = 0 mkdir("/var/run/asterisk", 0755) = -1 EEXIST (File exists) sched_setscheduler(0, SCHED_OTHER, { 0 }) = 0 geteuid32() = 0 getcwd("/root"..., 4096) = 6 stat64("/root", {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0 geteuid32() = 0 getegid32() = 0 getuid32() = 0 getgid32() = 0 access("/root", R_OK|X_OK) = 0 chdir("/") = 0 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f07000 write(1, "/33[0;37m", 7) = 7 stat64("/etc/asterisk/extconfig.conf", {st_mode=S_IFREG|0664, st_size=2462, ...}) = 0 open("/etc/asterisk/extconfig.conf", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0664, st_size=2462, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f06000 read(4, ";/n; Static and realtime external"..., 4096) = 2462 read(4, "", 4096) = 0 close(4) = 0 munmap(0xb7f06000, 4096) = 0 socket(PF_FILE, SOCK_STREAM, 0) = 4 connect(4, {sa_family=AF_FILE, path="/var/run/asterisk/asterisk.ctl"...}, 110) = 0 gettimeofday({1286764889, 322461}, NULL) = 0 futex(0x81b6b40, FUTEX_WAKE_PRIVATE, 2147483647) = 0 write(1, "Asterisk already running on /var"..., 91) = 91 write(1, "/33[0m", 4) = 4 exit_group(1) = ? [root@localhost ~]# strace -o asterisk.txt asterisk