--發現/home/oracle/database空間利用率過高
$ df -g
文件系統 GB 塊 可用 %Used Iused %Iused 安裝於
/dev/hd4 1.00 0.15 85% 7459 18% /
/dev/hd2 6.00 3.35 45% 52805 7% /usr
/dev/hd9var 1.00 0.86 15% 1170 1% /var
/dev/hd3 8.00 3.27 60% 64796 8% /tmp
/dev/hd1 18.00 9.29 49% 86096 4% /home
/dev/hd10opt 4.00 3.85 4% 2934 1% /opt
/dev/oraclelv 15.00 6.17 59% 23279 2% /home/oracle/database
/dev/crslv 15.00 5.22 66% 150520 11% /home/oracle/crs
--根據SORT排序查看哪個目錄空間最大
$ du -s /home/oracle/database/* | sort -rn | head
7691672 /home/oracle/database/network
5684552 /home/oracle/database/oc4j
3319464 /home/oracle/database/bin
2278592 /home/oracle/database/dbs
1171960 /home/oracle/database/lib
880256 /home/oracle/database/lib32
789696 /home/oracle/database/p570a_zjport1
669512 /home/oracle/database/jdk
629312 /home/oracle/database/jre
250096 /home/oracle/database/sysman
--初步判斷是/home/oracle/database/network目錄的偵聽日志過大
p550a:/home/oracle/database/network/log#ls -lt
總計 506536
-rw-r--r-- 1 oracle dba 168782267 2月02 10時32 listener_p550a.log
-rw-r--r-- 1 oracle dba 17152616 2月01 22時28 sqlnet.log
-rw-r--r-- 1 oracle dba 73300223 10月08 08時48 listener.log
--關閉偵聽日志記錄
$ lsnrctl set log_status off
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Production on 02-FEB-2012 10:35:46
Copyright (c) 1991, 2006, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "log_status" set to OFF
The command completed successfully
--查看偵聽狀態正常
$ lsnrctl stat
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Production on 02-FEB-2012 10:35:58
Copyright (c) 1991, 2006, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_P550A
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Production
Start Date 29-JAN-2012 08:49:09
Uptime 4 days 1 hr. 46 min. 50 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /home/oracle/database/network/admin/listener.ora
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.57)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.55)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Services Summary...
Service "hzport" has 1 instance(s).
Instance "hzport1", status READY, has 2 handler(s) for this service...
Service "hzportXDB" has 1 instance(s).
Instance "hzport1", status READY, has 1 handler(s) for this service...
Service "hzport_XPT" has 1 instance(s).
Instance "hzport1", status READY, has 2 handler(s) for this service...
The command completed successfully
--重命名日志
$ mv listener_p550a.log listener_p550a.log.bak
--打開偵聽日志記錄
$lsnrctl set log_status on
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.3.0 - Production on 02-FEB-2012 10:40:12
Copyright (c) 1991, 2006, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
LISTENER parameter "log_status" set to ON
The command completed successfully
--查看偵聽日志,發現已經自動新建了
$ ls -lt
總計 506552
-rw-r--r-- 1 oracle dba 49 2月02 10時40 listener_p550a.log
-rw-r--r-- 1 oracle dba 168787114 2月02 10時39 listener_p550a.log.bak
-rw-r--r-- 1 oracle dba 17152616 2月01 22時28 sqlnet.log
-rw-r--r-- 1 oracle dba 73300223 10月08 08時48 listener.bak
本文出自 “麥地塢” 博客,請務必保留此出處http://yunlongzheng.blog.51cto.com/788996/770953