|
本帖最后由 jiawang 于 2020-1-8 18:15 编辑
1.集群清理:
注意:集群中listener_scan1.log清理方式有所不同
lsnrctl命令行模式
set current_listener listener_scan1
set log_status off
cat /dev/null > listener_scan1.log
set log_status on
cat listener_scan1.log
2、具体步骤
[grid@rac01 ~]$ cd /u01/app/grid/product/11.2.0/grid/network/log
[grid@rac01 log]$ ll
总用量 2075080
-rw-r----- 1 grid oinstall 135061105 8月 6 14:04 listener.log
-rw-r----- 1 grid oinstall 128444199 7月 9 13:45 listener.log20190709
-rw-r----- 1 grid oinstall 1861360855 8月 6 14:04 listener_scan1.log
[grid@rac01 gi]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 06-AUG-2019 14:10:50
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> set current_listener listener_scan1
Current Listener is listener_scan1
LSNRCTL> set log_status off
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
listener_scan1 parameter "log_status" set to OFF
The command completed successfully
LSNRCTL> set log_status on
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
listener_scan1 parameter "log_status" set to ON
The command completed successfully
[grid@rac01 log]$ cat /dev/null > listener_scan1.log
[grid@rac01 log]$ ll
总用量 131964
-rw-r----- 1 grid oinstall 55356 8月 6 14:17 listener.log
-rw-r----- 1 grid oinstall 135064216 8月 6 14:04 listener.log20190806
-rw-r----- 1 grid oinstall 0 8月 6 14:17 listener_scan1.log
[grid@rac01 log]$ ll
总用量 131968
-rw-r----- 1 grid oinstall 55976 8月 6 14:17 listener.log
-rw-r----- 1 grid oinstall 135064216 8月 6 14:04 listener.log20190806
-rw-r----- 1 grid oinstall 542 8月 6 14:17 listener_scan1.log
|
|