Трассировка процесса по PID:
В Linux:
strace -f -o /tmp/trace.log -p< PID >
В Solaris:
truss -faied -o /tmp/trace.log -p < PID >
Используйте CTRL+C для завершения трассировки.
Трассировка приложений:
В Linux:
strace -f -o /tmp/trace.log < PROGRAM >
В Solaris:
truss -faied -o /tmp/trace.log < PROGRAM >
Пример:
$strace -f -o /tmp/trace.log $ORACLE_HOME/bin/sqlplus / as sysdba
You may see some (Permission denied) in the trace.log like the following:
21810 open("/oracle/PROD/db/tech_st/11.1.0/admin/PROD_erptest/diag/rdbms/prod/PROD/alert/log.xml", O_WRONLY|O_CREAT|O_APPEND, 0664) = -1 EACCES (Permission denied)
......
21810 open("/oracle/PROD/db/tech_st/11.1.0/admin/PROD_erptest/diag/rdbms/prod/PROD/trace/alert_PROD.log", O_WRONLY|O_CREAT|O_APPEND, 0664) = -1 EACCES (Permission denied)
The 'ls' command should show permissions 6751 (as follows)
Please check permissions by running:
$ cd $ORACLE_HOME/bin
$ ls -l oracle
The output should show the correct permission which is:
-rwsr-s--x 1 oracle dba
If not, then please execute the following to correct the permissions:
$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle
$ ls -l oracle
В Linux:
strace -f -o /tmp/trace.log -p
В Solaris:
truss -faied -o /tmp/trace.log -p
Используйте CTRL+C для завершения трассировки.
Трассировка приложений:
В Linux:
strace -f -o /tmp/trace.log < PROGRAM >
В Solaris:
truss -faied -o /tmp/trace.log
Пример:
$strace -f -o /tmp/trace.log $ORACLE_HOME/bin/sqlplus / as sysdba
You may see some (Permission denied) in the trace.log like the following:
21810 open("/oracle/PROD/db/tech_st/11.1.0/admin/PROD_erptest/diag/rdbms/prod/PROD/alert/log.xml", O_WRONLY|O_CREAT|O_APPEND, 0664) = -1 EACCES (Permission denied)
......
21810 open("/oracle/PROD/db/tech_st/11.1.0/admin/PROD_erptest/diag/rdbms/prod/PROD/trace/alert_PROD.log", O_WRONLY|O_CREAT|O_APPEND, 0664) = -1 EACCES (Permission denied)
The 'ls' command should show permissions 6751 (as follows)
Please check permissions by running:
$ cd $ORACLE_HOME/bin
$ ls -l oracle
The output should show the correct permission which is:
-rwsr-s--x 1 oracle dba
If not, then please execute the following to correct the permissions:
$ cd $ORACLE_HOME/bin
$ chmod 6751 oracle
$ ls -l oracle