中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

linux 快速定位alert 日志中出錯信息

發布時間:2020-08-10 17:45:17 來源:ITPUB博客 閱讀:164 作者:hadba 欄目:關系型數據庫


tail -f -500 /data/oracle/SHPBLS/admin/diag/rdbms/shpbls_sb/SHPBLS/trace/alert_SHPBLS.log


| grep 'ORA-|rror'

tail -n 1000 alert_ahjcyl.log |grep ORA-



cd /data/oracle/SHPBLS/admin/diag/rdbms/shpbls_sb/SHPBLS/trace/
tail -n 1000 alert_*.log
tail -n 1000 alert_*.log  | grep ORA-
tail -n 10000 alert_*.log | grep -A 6 ORA-
tail -n 10000 alert_*.log | grep -B 6 ORA-
tail -n 10000 alert_*.log | grep -C 6 ORA-


[oracle@ahjcyl-db bdump]$ tail -n 1000 alert_ahjcyl.log |grep ORA-
ORA-12012: error on auto execute of job 22
ORA-00054: resource busy and acquire with NOWAIT specified
ORA-06512: at "DOCTOR.SPL_SJPT_ARCHUSAGE", line 18
ORA-06512: at "DOCTOR.SPL_SJPT_DAYLY", line 34
ORA-06512: at line 1

---能看到一錯誤信息,tail -n xx是最后的多少行通過管道符傳給grep查看,但是看的摸不到頭腦,要是能顯示錯誤信息行再分別附帶出錯后下面的幾行應該更好,再往下看

[oracle@ahjcyl-db bdump]$ tail -n 10000 alert_ahjcyl.log |grep -A 6 ORA-

WARNING: inbound connection timed out (ORA-3136)
Fri Sep  9 18:01:34 2011
WARNING: inbound connection timed out (ORA-3136)
Fri Sep  9 18:05:29 2011
Thread 1 advanced to log sequence 2566 (LGWR switch)
  Current log# 6 seq# 2566 mem# 0: /oracle/oradata/ahjcyl/redo06_02.log
  Current log# 6 seq# 2566 mem# 1: /oradata/ahjcyl/redo06_01.log
Fri Sep  9 20:14:54 2011
Thread 1 advanced to log sequence 2567 (LGWR switch)
--
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP 
Fri Sep  9 22:18:55 2011
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP 
Fri Sep  9 22:42:39 2011
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP 
Sat Sep 10 01:03:00 2011
Starting control autobackup
Control autobackup written to DISK device
        handle '/oracle/flash_recovery_area/AHJCYL/autobackup/2011_09_10/o1_mf_s_761446980_76nkp55y_.bkp'
Sat Sep 10 01:03:05 2011
ALTER SYSTEM ARCHIVE LOG
--
ORA-12012: error on auto execute of job 22
ORA-00054: resource busy and acquire with NOWAIT specified
ORA-06512: at "DOCTOR.SPL_SJPT_ARCHUSAGE", line 18
ORA-06512: at "DOCTOR.SPL_SJPT_DAYLY", line 34
ORA-06512: at line 1
Wed Sep 14 13:02:18 2011
Thread 1 advanced to log sequence 2711 (LGWR switch)
  Current log# 6 seq# 2711 mem# 0: /oracle/oradata/ahjcyl/redo06_02.log
  Current log# 6 seq# 2711 mem# 1: /oradata/ahjcyl/redo06_01.log
Wed Sep 14 13:13:49 2011
Thread 1 advanced to log sequence 2712 (LGWR switch)

--是不是看的有點明確了,如果想要出錯信息前的幾行呢?再往下看
[oracle@ahjcyl-db bdump]$ tail -n 10000 alert_ahjcyl.log |grep -B 6 ORA-

  Current log# 1 seq# 2564 mem# 1: /oradata/ahjcyl/redo01_01.log
Fri Sep  9 18:00:14 2011
Thread 1 advanced to log sequence 2565 (LGWR switch)
  Current log# 2 seq# 2565 mem# 0: /oracle/oradata/ahjcyl/redo02_02.log
  Current log# 2 seq# 2565 mem# 1: /oradata/ahjcyl/redo02_01.log
Fri Sep  9 18:01:34 2011
WARNING: inbound connection timed out (ORA-3136)
Fri Sep  9 18:01:34 2011
WARNING: inbound connection timed out (ORA-3136)
--
  Current log# 6 seq# 2566 mem# 1: /oradata/ahjcyl/redo06_01.log
Fri Sep  9 20:14:54 2011
Thread 1 advanced to log sequence 2567 (LGWR switch)
  Current log# 4 seq# 2567 mem# 0: /oracle/oradata/ahjcyl/redo04_02.log
  Current log# 4 seq# 2567 mem# 1: /oradata/ahjcyl/redo04_01.log
Fri Sep  9 22:18:55 2011
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP 
Fri Sep  9 22:18:55 2011
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP 
Fri Sep  9 22:42:39 2011
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP 

--但如果要是看數據的前\后幾行呢 a+b ,再往下看
[oracle@ahjcyl-db bdump]$ tail -n 10000 alert_ahjcyl.log |grep -C 6 ORA-

Control autobackup written to DISK device
        handle '/oracle/flash_recovery_area/AHJCYL/autobackup/2011_09_08/o1_mf_s_761322189_76jqtf7g_.bkp'
Completed: alter database add logfile group 2 ('/oracle/oradata/ahjcyl/redo02_02.log','/oradata/ahjcyl/redo02_01.log') size 200m
Thu Sep  8 14:24:03 2011
alter database drop logfile group 3
Thu Sep  8 14:24:03 2011
ORA-1624 signalled during: alter database drop logfile group 3...
Thu Sep  8 14:24:50 2011
alter database drop logfile group 3
Thu Sep  8 14:24:50 2011
Starting control autobackup
Control autobackup written to DISK device
        handle '/oracle/flash_recovery_area/AHJCYL/autobackup/2011_09_08/o1_mf_s_761322290_76jqxljw_.bkp'
--
  Current log# 1 seq# 2564 mem# 1: /oradata/ahjcyl/redo01_01.log
Fri Sep  9 18:00:14 2011
Thread 1 advanced to log sequence 2565 (LGWR switch)
  Current log# 2 seq# 2565 mem# 0: /oracle/oradata/ahjcyl/redo02_02.log
  Current log# 2 seq# 2565 mem# 1: /oradata/ahjcyl/redo02_01.log
Fri Sep  9 18:01:34 2011
WARNING: inbound connection timed out (ORA-3136)
Fri Sep  9 18:01:34 2011
WARNING: inbound connection timed out (ORA-3136)
Fri Sep  9 18:05:29 2011
Thread 1 advanced to log sequence 2566 (LGWR switch)
  Current log# 6 seq# 2566 mem# 0: /oracle/oradata/ahjcyl/redo06_02.log
  Current log# 6 seq# 2566 mem# 1: /oradata/ahjcyl/redo06_01.log
Fri Sep  9 20:14:54 2011
Thread 1 advanced to log sequence 2567 (LGWR switch)
  Current log# 4 seq# 2567 mem# 0: /oracle/oradata/ahjcyl/redo04_02.log
  Current log# 4 seq# 2567 mem# 1: /oradata/ahjcyl/redo04_01.log
Fri Sep  9 22:18:55 2011
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP 
Fri Sep  9 22:18:55 2011
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP 
Fri Sep  9 22:42:39 2011
ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP 
Sat Sep 10 01:03:00 2011
Starting control autobackup
Control autobackup written to DISK device
        handle '/oracle/flash_recovery_area/AHJCYL/autobackup/2011_09_10/o1_mf_s_761446980_76nkp55y_.bkp'
Sat Sep 10 01:03:05 2011
ALTER SYSTEM ARCHIVE LOG

--沒錯就是grep -C 具體解釋問男人吧,man grep
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

潢川县| 曲阳县| 兴山县| 门源| 那曲县| 葫芦岛市| 双桥区| 隆德县| 青海省| 西丰县| 莆田市| 安达市| 盐边县| 平江县| 松江区| 通江县| 上杭县| 兖州市| 襄汾县| 英山县| 辉县市| 交城县| 木里| 百色市| 哈巴河县| 兰溪市| 谷城县| 金昌市| 时尚| 麻阳| 格尔木市| 合江县| 封丘县| 青浦区| 凌海市| 中阳县| 万山特区| 阿瓦提县| 北宁市| 尼玛县| 东海县|