使用Linux Strace跟踪调试Oracle程序进程(2)

14:21:14 statfs("/u01/app/oracle/sqlplus/admin/glogin.sql", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=174170552, f_bfree=147038320, f_bavail=138190973, f_files=44236800, f_ffree=44019067, f_fsid={1821877354, 763674030}, f_namelen=255, f_frsize=4096}) = 0

14:21:14 open("/u01/app/oracle/sqlplus/admin/glogin.sql", O_RDONLY) = 7

如果在启动sqlplus过程中,直接进行登录。跟踪过程中还包括了登录动作。

[oracle@localhost ~]$ strace -t -e trace=file sqlplus / as sysdba

14:29:30 execve("/u01/app/oracle/bin/sqlplus", ["sqlplus", "/", "as", "sysdba"], [/* 31 vars */]) = 0

(相同篇幅内容,略……)

SQL*Plus: Release 11.2.0.4.0 Production on Fri Jun 12 14:29:30 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

--差异部分

14:29:30 open("/u01/app/oracle/dbs/cm_xxxdb.dat", O_RDONLY|O_DSYNC) = -1 ENOENT (No such file or directory)

14:29:30 getcwd("/home/oracle", 256)    = 13

14:29:30 open("/proc/self/cmdline", O_RDONLY) = 7

14:29:30 open("/etc/nsswitch.conf", O_RDONLY) = 7

14:29:30 open("/u01/app/oracle/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)

14:29:30 open("/etc/ld.so.cache", O_RDONLY) = 7

14:29:30 open("/lib64/libnss_files.so.2", O_RDONLY) = 7

14:29:30 open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 7

14:29:30 open("/u01/app/oracle/lib/libnque11.so", O_RDONLY) = 7

14:29:30 getcwd("/home/oracle", 256)    = 13

14:29:30 open("/u01/app/oracle/nls/data/lx20369.nlb", O_RDONLY) = 7

14:29:30 open("/u01/app/oracle/nls/data/lx207d0.nlb", O_RDONLY) = 7

14:29:30 readlink("/proc/self/fd/0", "/dev/pts/0", 254) = 10

14:29:30 open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 7

14:29:30 open("/etc/host.conf", O_RDONLY) = 7

14:29:30 open("/etc/resolv.conf", O_RDONLY) = 7

14:29:30 open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 7

14:29:30 open("/etc/hostid", O_RDONLY)  = -1 ENOENT (No such file or directory)

14:29:30 open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 7

14:29:30 open("/u01/app/oracle/rdbms/mesg/oraus.msb", O_RDONLY) = 7

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

14:29:30 stat("login.sql", 0x7fff0a822b10) = -1 ENOENT (No such file or directory)

14:29:30 stat("/u01/app/oracle/sqlplus/admin/glogin.sql", {st_mode=S_IFREG|0644, st_size=368, ...}) = 0

14:29:30 access("/u01/app/oracle/sqlplus/admin/glogin.sql", F_OK) = 0

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/01fd4c63bae843e355dfcd4c343819a3.html