--发现/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
本文转自zylhsy 51CTO博客,原文链接:http://blog.51cto.com/yunlongzheng/770953,如需转载请自行联系原作者