技术笔记:oracleracinode占用高清除

简介: 技术笔记:oracleracinode占用高清除

环境:centos 6.10 ORACLE 11.2.0.1 RAC 环境


== audit 文件夹


【root@rac01 ~】# df -i


Filesystem Inodes IUsed IFree IUse% Mounted on


/dev/mapper/vg_rac01-lv_root


3276800 673377 2603423 21% /


tmpfs 4105886 272 4105614 1% /dev/shm


/dev/vda1 128016 39 127977 1% /boot


/dev/mapper/vg_rac01-lv_home


8773632 117 8773515 1% /home


【root@rac01 ~】# find /u01/ -user zabbix


【root@rac01 ~】# find / -type f -size +500M |xargs du -shm


find: /proc/183849/task/183849/fdinfo/5': No such file or directory</p> <p>find:/proc/183849/fdinfo/5': No such file or directory


1060 /opt/linux.x64_11gR2_database_2of2.zip


1005 /opt/linux.x64_11gR2_grid.zip


1182 /opt/linux.x64_11gR2_database_1of2.zip


16501 /home/swapfile/swapfile


940 /home/rman_store/_2021-07-31.dmp


936 /home/rman_store/_2021-07-29.dmp


You have new mail in /var/spool/mail/root


【root@rac01 ~】# find /u01 -amin -20


/u01/app/oracle/product/11.2.0/db_1/dbs/orapw1


/u01/app/oracle/diag


/u01/app/oracle/diag/rdbms//1/metadata/INC_METER_SUMMARY.ams


/u01/app/oracle/diag/rdbms/*/1/metadata/INC_METER_INFO.ams


/u01/app/oracle/diag/rdbms//1/metadata/INC_METER_CONFIG.ams


/u01/app/11.2.0/grid/rdbms/audit


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_182937_1.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_183537_4.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_183530_6.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_181601_3.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_181598_4.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_182283_3.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_182934_1.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_182280_3.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_182941_2.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_182286_4.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_181604_3.aud


/u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_183534_3.aud


/u01/app/11.2.0/grid/auth/ohasd/rac01


/u01/app/11.2.0/grid/auth/crs/rac01


/u01/app/grid/diag


【root@rac01 ~】# ll /u01/app/11.2.0/grid/rdbms/audit/ |wc -l


477093


查看文件内容


【root@rac01 audit】# cat +asm1_ora_99999_3.aud


Audit file /u01/app/11.2.0/grid/rdbms/audit/+asm1_ora_99999_3.aud


Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production


With the Real Application Clusters and Automatic Storage Management options


ORACLE_HOME = /u01/app/11.2.0/grid


System name: Linux


Node name: rac01


Release: 2.6.32-754.el6.x86_64


Version: #1 SMP Tue Jun 19 21:26:04 UTC 2018


Machine: x86_64


Instance name: +ASM1


Redo thread mounted by this instance: 0


Oracle process number: 26


Unix process pid: 99999, image: oracle@rac01 (TNS V1-V3)


Fri May 14 14:19:38 2021 -04:00


LENGTH : '142'


ACTION :【7】 'CONNECT'


DATABASE USER:【1】 '/'


PRIVILEGE :【6】 'SYSASM'


CLIENT USER:【4】 'grid'


CLIENT TERMINAL:【0】 ''


STATUS:【1】 '0'


DBID:【0】 ''


You have new mail in /var/spool/mail/root


【root@rac01 audit】# find -amin -5


.


./+asm1_ora_184303_2.aud


./+asm1_ora_184300_1.aud


./+asm1_ora_99999_3.aud


./+asm1_ora_184306_2.aud


【root@rac01 audit】# ll +asm1_ora_9999.aud |wc -l


28


【root@rac01 audit】# ll +asm1_ora_99999_3.aud


-rw-r----- 1 grid oinstall 723 May 14 14:19 +asm1_ora_99999_3.aud


查看oracle变量


【root@rac01 audit】# su - oracle


【oracle@rac01 ~】$ sqlplus / as sysdba


SQLPlus: Release 11.2.0.1.0 Production on Thu Aug 5 20:08:23 2021


Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:


Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production


With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,


Data Mining and Real Application Testing options


SQL

no rows selected


SQL

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------


audit_file_dest string /u01/app/oracle/admin//adum


p


audit_sys_operations boolean FALSE


audit_syslog_level string


audit_trail string DB


SQL

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production


With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,


Data Mining and Real Application Testing options


【oracle@rac01 ~】$ su - grid


Password:


【grid@rac01 ~】$ sqlplus / as sysdba


SQLPlus: Release 11.2.0.1.0 Production on Thu Aug 5 20:09:09 2021


Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:


Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production


With the Real Application Clusters and Automatic Storage Management options


SQL

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------


audit_file_dest string /u01/app/11.2.0/grid/rdbms/aud


it


audit_sys_operations boolean FALSE


audit_syslog_level string


SQL

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production


With the Real Application Clusters and Automatic Storage Management options


【root@rac01 audit】# pwd


/u01/app/11.2.0/grid/rdbms/audit


【grid@rac01 audit】$ rm -f +asm1_ora_1.aud


【grid@rac01 audit】$ ll +asm1_ora_11111.aud |wc -l


32


【grid@rac01 audit】$ ll +asm1_ora_11111.aud


-rw-r----- 1 grid oinstall 725 Feb 27 11:13 +asm1_ora_111110_1.aud


-rw-r----- 1 grid oinstall 725 May 6 17:39 +asm1_ora_111110_2.aud


-rw-r----- 1 grid oinstall 725 Nov 24 2020 +asm1_ora_111111_1.aud


-rw-r----- 1 grid oinstall 728 Feb 8 2020 +asm1_ora_11111_1.aud


-rw-r----- 1 grid oinstall 725 May 1 2020 +asm1_ora_111112_1.aud


-rw-r----- 1 grid oinstall 725 Jul 10 2020 +asm1_ora_111112_2.aud


-rw-r----- 1 grid oinstall 725 Jun 7 19:48 +asm1_ora_111112_3.aud


-rw-r----- 1 grid oinstall 725 Sep 6 2020 +asm1_ora_111113_1.aud


-rw-r----- 1 grid oinstall 725 Nov 28 2020 +asm1_ora_111113_2.aud


-rw-r----- 1 grid oinstall 725 May 6 17:39 +asm1_ora_111113_3.aud


-rw-r----- 1 grid oinstall 727 Apr 9 2020 +asm1_ora_111114_1.aud


-rw-r----- 1 grid oinstall 725 Nov 20 2020 +asm1_ora_111114_2.aud


-rw-r----- 1 grid oinstall 725 Nov 24 2020 +asm1_ora_111114_3.aud


-rw-r----- 1 grid oinstall 725 Nov 28 2020 +asm1_ora_111114_4.aud


-rw-r----- 1 grid oinstall 725 Sep 6 2020 +asm1_ora_111115_1.aud


-rw-r----- 1 grid oinstall 725 Oct 26 2020 +asm1_ora_111115_2.aud


-rw-r----- 1 grid oinstall 725 Nov 20 2020 +asm1_ora_111115_3.aud


-rw-r----- 1 grid oinstall 725 Nov 24 2020 +asm1_ora_111115_4.aud


-rw-r----- 1 grid oinstall 725 Jun 7 19:48 +asm1_ora_111115_5.aud


-rw-r----- 1 grid oinstall 725 Feb 12 2020 +asm1_ora_111116_1.aud


-rw-r----- 1 grid oinstall 725 Aug 25 2020 +asm1_ora_111116_2.aud


-rw-r----- 1 grid oinstall 725 Nov 20 2020 +asm1_ora_111116_3.aud


-rw-r----- 1 grid oinstall 725 Feb 27 11:13 +asm1_ora_111116_4.aud


-rw-r----- 1 grid oinstall 725 Mar 15 13:01 +asm1_ora_111116_5.aud


-rw-r----- 1 grid oinstall 725 Feb 12 2020 +asm1_ora_111117_1.aud


-rw-r----- 1 grid oinstall 725 Nov 28 2020 +asm1_ora_111117_2.aud


-rw-r----- 1 grid oinstall 725 Feb 27 11:13 +asm1_ora_111117_3.aud


-rw-r----- 1 grid oinstall 725 Sep 6 2020 +asm1_ora_111118_1.aud


-rw-r----- 1 grid oinstall 725 Jun 7 19:48 +asm1_ora_111118_2.aud


-rw-r----- 1 grid oinstall 725 Aug 25 2020 +asm1_ora_111119_1.aud


-rw-r----- 1 grid oinstall 725 Oct 26 2020 +asm1_ora_111119_2.aud


-rw-r----- //代码效果参考:http://www.jhylw.com.cn/231533003.html

1 grid oinstall 725 Mar 15 13:01 +asm1_ora_111119_3.aud

【grid@rac01 audit】$ du -sh


27M .


【grid@rac01 audit】$ df -i


Filesystem Inodes IUsed IFree IUse% Mounted on


/dev/mapper/vg_rac01-lv_root


3276800 197640 3079160 7% /


tmpfs 4105886 272 4105614 1% /dev/shm


/dev/vda1 128016 39 127977 1% /boot


/dev/mapper/vg_rac01-lv_home


8773632 117 8773515 1% /home


【grid@rac01 audit】$ ll |wc -l


1351


【grid@rac01 audit】$ find /u01/app/11.2.0/grid/rdbms/audit -mtime +1 -name "+asm1ora.aud" |xargs rm -rf "+asm1ora.aud"


节点2


【root@rac02 ~//代码效果参考:http://www.jhylw.com.cn/482739359.html

】# df -i

Filesystem Inodes IUsed IFree IUse% Mounted on


/dev/mapper/vg_rac02-lv_root


3276800 647641 2629159 20% /


tmpfs 4105886 272 4105614 1% /dev/shm


/dev/vda1 128016 39 127977 1% /boot


/dev/mapper/vg_rac02-lv_home


8773632 125 8773507 1% /home


【root@rac02 ~】# su - grid


【grid@rac02 ~】$ cd /u01/app/11.2.0/grid/rdbms/audit


【grid@rac02 audit】$ ll +asm2_ora_9999.aud |wc -l


26


## find /u01/app/11.2.0/grid/rdbms/audit -mtime +1 -name "+asm2ora.aud" |xargs rm -f "+asm2ora.aud"


【grid@rac02 audit】$ find /u01/app/11.2.0/grid/rdbms/audit -mtime +1 -name "+asm2ora.aud" |xargs rm -f "+asm2ora.aud"


【grid@rac02 audit】$ df -i


Filesystem Inodes IUsed IFree IUse% Mounted on


/dev/mapper/vg_rac02-lv_root


3276800 172851 3103949 6% /


tmpfs 4105886 272 4105614 1% /dev/shm


/dev/vda1 128016 39 127977 1% /boot


/dev/mapper/vg_rac02-lv_home


8773632 125 8773507 1% /home


【grid@rac02 audit】$ ll |wc -l


1747


==adump 文件夹 :记录的是SYS的登录信息,用以审计,可以删除


【root@rac01 ~】# cd /u01/app/oracle/admin/


【root@rac01 **】# ll


total 1908


drwxr-x--- 2 oracle oinstall 1933312 Aug 5 20:08 adump


drwxr-x--- 2 oracle oinstall 4096 Feb 8 2020 dpdump


drwxr-x--- 2 oracle oinstall 4096 Feb 8 2020 hdump


drwxr-x--- 2 oracle oinstall 4096 Feb 8 2020 pfile


drwxr-x--- 2 oracle oinstall 4096 Feb 8 2020 scripts


【root@rac01 】# cd adump/


【root@rac01 adump】# ls |wc -l


42668


【root@rac01 adump】# find -atime -2


.


./1_ora_186002_1.aud


【root@rac01 adump】# cat 1_ora_186002_1.aud


Audit file /u01/app/oracle/admin//adump/1_ora_186002_1.aud


Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production


With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,


Data Mining and Real Application Testing options


ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1


System name: Linux


Node name: rac01


Release: 2.6.32-754.el6.x86_64


Version: #1 SMP Tue Jun 19 21:26:04 UTC 2018


Machine: x86_64


Instance name: 1


Redo thread mounted by this instance: 1


Oracle process number: 44


Unix process pid: 186002, image: oracle@rac01 (TNS V1-V3)


Thu Aug 5 20:08:23 2021 -04:00


LENGTH : '160'


ACTION :【7】 'CONNECT'


DATABASE USER:【1】 '/'


PRIVILEGE :【6】 'SYSDBA'


CLIENT USER:【6】 'oracle'


CLIENT TERMINAL:【5】 'pts/0'


STATUS:【1】 '0'


DBID:【10】 '1639890347'


【root@rac01 adump】# find /u01/app/oracle/admin/*/adump/ -mtime +1 -name "aud" -exec rm -rf {} \;


^C


【root@rac01 adump】# ls | xargs -n 10 rm -fr ls

相关文章
|
文字识别 Oracle 关系型数据库
|
6月前
|
存储 监控 关系型数据库
突破IO瓶颈:PolarDB分布式并行查询(Parallel Query)深度调优手册
在海量数据处理中,I/O瓶颈严重制约数据库性能。本文基于PolarDB MySQL 8.0.32版本,深入解析分布式并行查询技术如何提升CPU利用率至86.7%、IO吞吐达8.5GB/s,并结合20+实战案例,系统讲解并行架构、执行计划优化、资源调优与故障排查方法,助力实现高性能数据分析。
224 6
|
存储 前端开发 搜索推荐
打造个性化网页计数器
【8月更文挑战第31天】本文带你一步步构建一个简单而独特的网页计数器,不仅记录访问量,还能展现你的个人风格。我们将从基础的HTML结构出发,逐步引入CSS美化和JavaScript实现动态效果,最后通过一个简单的后端服务完成数据的持久化。无论你是编程新手还是希望给你的网页添加一点趣味,这篇文章都会为你提供所需指导。
|
存储 运维 监控
“df -i” 以inode模式来显示磁盘使用情况--这是什么意思?
“df -i” 以inode模式来显示磁盘使用情况--这是什么意思?
642 0
|
12月前
|
SQL 关系型数据库 MySQL
数据库灾难应对:MySQL误删除数据的救赎之道,技巧get起来!之binlog
《数据库灾难应对:MySQL误删除数据的救赎之道,技巧get起来!之binlog》介绍了如何利用MySQL的二进制日志(Binlog)恢复误删除的数据。主要内容包括: 1. **启用二进制日志**:在`my.cnf`中配置`log-bin`并重启MySQL服务。 2. **查看二进制日志文件**:使用`SHOW VARIABLES LIKE &#39;log_%&#39;;`和`SHOW MASTER STATUS;`命令获取当前日志文件及位置。 3. **创建数据备份**:确保在恢复前已有备份,以防意外。 4. **导出二进制日志为SQL语句**:使用`mysqlbinlog`
842 2
|
存储 编解码 网络协议
阿里云目前活动中各实例规格性能、指标数据、适用场景及选择参考
很多新手用户初次通过阿里云各种活动购买云服务器的时候,面对各种不同的实例规格,往往不知道应该怎么选,目前在阿里云的活动中,除了轻量应用服务器之外,活动内的云服务器实例规格主要以经济型e、通用算力型u1、计算型c7/c8y、通用型g7/g8y、内存型r7/r8y这几个实例规格为主,不同的云服务器实例规格在性能特点、适用场景等方面均有所差异。本文将详细介绍阿里云目前活动中常见的实例规格及其性能特点、适用场景,帮助用户更好地选择适合自己的云服务器配置。
阿里云目前活动中各实例规格性能、指标数据、适用场景及选择参考
|
SQL 关系型数据库 MySQL
|
Java Spring 监控
Spring Boot Actuator:守护你的应用心跳,让监控变得触手可及!
【8月更文挑战第31天】Spring Boot Actuator 是 Spring Boot 框架的核心模块之一,提供了生产就绪的特性,用于监控和管理 Spring Boot 应用程序。通过 Actuator,开发者可以轻松访问应用内部状态、执行健康检查、收集度量指标等。启用 Actuator 需在 `pom.xml` 中添加 `spring-boot-starter-actuator` 依赖,并通过配置文件调整端点暴露和安全性。Actuator 还支持与外部监控工具(如 Prometheus)集成,实现全面的应用性能监控。正确配置 Actuator 可显著提升应用的稳定性和安全性。
764 1
|
机器学习/深度学习 算法 Unix
循环编码:时间序列中周期性特征的一种常用编码方式
循环编码是深度学习中处理周期性数据的一种技术,常用于时间序列预测。它将周期性特征(如小时、日、月)转换为网络可理解的形式,帮助模型识别周期性变化。传统的one-hot编码将时间特征转换为分类特征,而循环编码利用正弦和余弦转换,保持时间顺序信息。通过将时间戳转换为弧度并应用sin和cos,每个原始特征只映射到两个新特征,减少了特征数量。这种方法在神经网络中有效,但在树模型中可能需谨慎使用。
1663 5
|
缓存 数据库
高并发场景下,到底先更新缓存还是先更新数据库?
高并发场景下,到底先更新缓存还是先更新数据库?
202 0