Oralce监控之系统和库日志文件(二)

1.2 检查系统和oracle日志文件
1.2.1 检查操作系统日志文件
[root@TEST ~]# cat /var/log/messages |grep failed
[root@TEST ~]# cat /var/log/messages 
Jan  8 04:03:04 test syslogd 1.4.1: restart.
Jan  9 16:43:06 test avahi-daemon[3248]: Invalid query packet.
Jan  9 16:43:47 test last message repeated 10 times
Jan  9 17:01:24 test avahi-daemon[3248]: Invalid query packet.
Jan  9 17:09:47 test last message repeated 16 times
Jan  9 19:05:21 test last message repeated 8 times
Jan  9 20:50:56 test last message repeated 10 times
Jan  9 21:42:59 test last message repeated 8 times
Jan  9 22:09:13 test last message repeated 8 times
Jan  9 22:10:18 test last message repeated 13 times
Jan  9 22:11:26 test last message repeated 14 times
Jan  9 22:12:06 test last message repeated 7 times
Jan  9 16:14:11 test smartd[3310]: System clock time adjusted to the past. Resetting next wakeup time. --重置了系统时间
Jan  9 16:24:56 test avahi-daemon[3248]: Invalid query packet.
Jan  9 16:25:36 test last message repeated 10 times
Jan 10 08:50:34 test avahi-daemon[3248]: Invalid query packet.
Jan 10 08:53:30 test last message repeated 8 times
Jan 10 10:57:17 test last message repeated 23 times
Jan 10 12:58:30 test last message repeated 16 times
Jan 10 13:00:29 test last message repeated 8 times
Jan 10 13:10:01 test last message repeated 16 times

avahi-daemon是一种Linux操作系统上运行在客户机上实施查找基于网络的Zeroconf service的服务守护进程。 该服务可以为Zeroconf网络实现DNS服务发现及DNS组播规范。 用户程序通过Linux D-Bus信息传递接收发现到网络服务和资源的通知。该守护进程配合缓存用户程序的答复,以帮助减少因答复而产生的网络流量。

网上有网友建议:除非你有兼容的设备或使用 zeroconf 协议的服务,否则应该关闭它。
[root@TEST ~]# service avahi-daemon stop
Shutting down Avahi daemon:                                [  OK  ]
[root@TEST ~]# chkconfig avahi-daemon off
[root@TEST ~]# chkconfig avahi-daemon --list
avahi-daemon    0:off   1:off   2:off   3:off   4:off   5:off   6:off

1.2.2 检查oracle日志文件
Oracle在运行过程中,会在警告日志文件(alert_SID.log)中记录数据库的一些运行情况:
数据库的启动、关闭,启动时的非缺省参数;数据库的重做日志切换情况,记录每次切换的时间,及如果因为检查(checkpoint)操作没有执行完成造成不能切换,会记录不能切换的原因;对数据库进行的某些操作,如创建或删除表空间、增加数据文件;数据库发生的错误,如表空间不够、出现坏块、数据库内部错误(ORA-600)等。


(1)alert_SID.log 警告日志文件
SQL> show parameter background_dump_dest
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_dump_dest                 string      /u01/app/oracle/diag/rdbms/tes t/test/trace

[oracle@TEST trace]$ cd /u01/app/oracle/diag/rdbms/test/test/trace
[oracle@TEST trace]$ cat alert_test.log |grep failed
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00444: background process "CJQ0" failed while starting
ORA-00444: background process "CJQ0" failed while starting
ORA-00444: background process "CJQ0" failed while starting
ORA-00444: background process "CJQ0" failed while starting
[oracle@TEST trace]$ cat alert_test.log |grep ORA-
ORA-1109 signalled during: ALTER DATABASE CLOSE NORMAL...
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/test/redo01.log'
ORA-27037: unable to obtain file status
ORA-00313: open failed for members of log group 1 of thread 1
ORA-00312: online log 1 thread 1: '/u01/app/oracle/oradata/test/redo01.log'
ORA-27037: unable to obtain file status
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/test/redo02.log'
ORA-27037: unable to obtain file status
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/test/redo02.log'
ORA-27037: unable to obtain file status
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/test/redo03.log'
ORA-27037: unable to obtain file status
ORA-00313: open failed for members of log group 3 of thread 1
ORA-00312: online log 3 thread 1: '/u01/app/oracle/oradata/test/redo03.log'
ORA-27037: unable to obtain file status
ORA-604 signalled during: create tablespace HSCMP_TBL datafile '/u01/data/HSCMP_TBL.dbf' size 20G...
ORA-1525 signalled during: alter tablespace HSCMP_TBL_LOG rename datafile '/u01/data/ HSCMP_TBL_LOG.dbf' to '/u01/data/HSCMP_TBL_LOG.dbf'...
ORA-1525 signalled during:  alter tablespace HSCMP_TBL_LOG rename datafile '/u01/data/ HSCMP_TBL_LOG.dbf' to '/u01/data/HSCMP_TBL_LOG.dbf'...
ORA-1652: unable to extend temp segment by 128 in tablespace                 HSCMP_TBL 
ORA-1652: unable to extend temp segment by 128 in tablespace                 HSCMP_TBL 
ORA-1652: unable to extend temp segment by 128 in tablespace                 HSCMP_TBL 
ORA-1652: unable to extend temp segment by 128 in tablespace                 HSCMP_TBL 
ORA-1652: unable to extend temp segment by 128 in tablespace                 HSCMP_TBL 
ORA-1652: unable to extend temp segment by 8 in tablespace                 HSCMP_TBL 
ORA-1652: unable to extend temp segment by 8 in tablespace                 HSCMP_TBL 
ORA-1652: unable to extend temp segment by 8 in tablespace                 HSCMP_TBL 
ORA-1652: unable to extend temp segment by 8 in tablespace                 HSCMP_TBL 
ORA-1013 signalled during: ALTER DATABASE   MOUNT...
ORA-1507 signalled during: alter database archivelog...
ORA-1507 signalled during: alter database open...
ORA-00444: background process "CJQ0" failed while starting
ORA-01089: immediate shutdown in progress - no operations are permitted
ORA-00450: background process 'CJQ0' did not start
ORA-00444: background process "CJQ0" failed while starting
ORA-01089: immediate shutdown in progress - no operations are permitted
ORA-00444: background process "CJQ0" failed while starting
ORA-01089: immediate shutdown in progress - no operations are permitted
ORA-00450: background process 'CJQ0' did not start
ORA-00444: background process "CJQ0" failed while starting
ORA-01089: immediate shutdown in progress - no operations are permitted
[oracle@TEST trace]$ cat alert_test.log |grep ERR
???imp时报的一些错误 

(2) 监听日志文件  

listener 日志 $ORACLE_HOME/network/log


1.2.3 检查oracle核心转储文件
[oracle@TEST trace]$ cat test_vktm_3022.trc |wc -l
35
[oracle@TEST trace]$ cat test_vktm_9342.trc|wc -l
38

如果上面命令的结果每天都在增长,则说明 Oracle 进程经常发生核心转储。这说明某些用户进程或者数据库后台进程由于无法处理的原因而异常退出。频繁的核心转储特别是数据库后台进程的核心转储会导致数据库异常终止。 

在Unix/Linux中,有时程序并未经过彻底的调试,使得它们有可能在执行的时候出现一些比如段错误之类的情况,此时可能会导致核心转储(core dumps)。

套用《Classis Shell Scripting》一书的解释:
在Unix系统中,常将‘主内存’(main memory)称为核心(core),因为在使用半导体作为内存材料之前 ,便是使用核心(core)。而核心映像(core image)就是‘进程’(process)执行当时的内存内容。当进程发生错误或收到‘信号’(signal)而终止执行时,系统会将核心映像写入一个文件,以作为调试之用,这就是所谓的核心转储(core dumps)。

1.2.4 检查root用户和oracle用户的email
[root@TEST ~]# tail -n 100 /var/mail/root
[root@TEST ~]# tail -n 100 /var/mail/oralce
查看这两个文件中的错误信息

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31419698/viewspace-2132200/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31419698/viewspace-2132200/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值