客户反映宽带认证服务器,认证日志、认证详单没有且部分宽带用户有掉线现象
--处理过程
1.查看磁盘空间使用情况
df -h
发现有一磁盘使用100%
2.经过分析发现数据库日志异常大,清理相关日志
--10G
/u01/app/oracle/diag/tnslsnr/RADIUS1/listener/alert
--400M
/u01/app/oracle/diag/tnslsnr/RADIUS1/listener/trace
--6G
/u01/app/oracle/diag/rdbms/radius/radius/trace
--3G
/u01/app/oracle/diag/rdbms/radius/radius/alert
3.查看数据库空间使用情况
select dbf.tablespace_name,
dbf.totalspace
dbf.totalblocks ,
dfs.freespace,
dfs.freeblocks,
round((dfs.freespace / dbf.totalspace) * 100,2)||'%',
from (select t.tablespace_name,
sum(t.bytes) / 1024 / 1024 totalspace,
sum(t.blocks) totalblocks
from dba_data_files t
group by t.tablespace_name) dbf,
(select tt.tablespace_name,
sum(tt.bytes) / 1024 / 1024 freespace,
sum(tt.blocks) freeblocks
from dba_free_space tt
group by tt.tablespace_name) dfs
where trim(dbf.tablespace_name) = trim(dfs.tablespace_name);
users 空间已满 添加 表空间
alter tablespace users add datafile '/home/oradata/radius/radius/users02.dbf' size 4096m autoextend on ;
4.以上处理完成,查看宽带认证日志,宽带认证详单已正常
5.编写shell 脚本定期清日志
#!/bin/bash
find /u01/app/oracle/diag/tnslsnr/RADIUS1/listener/alert -name 'log_*.xml' -type f -exec rm -f {} \;
cat /dev/null>/u01/app/oracle/diag/tnslsnr/RADIUS1/listener/trace/listener.log
find /u01/app/oracle/diag/rdbms/radius/radius/alert -name 'log_*.xml' -type f -exec rm -f {} \;
cat /dev/null>/u01/app/oracle/diag/rdbms/radius/radius/trace/alert_radius.log
6.添加计划任务
30 2 */7 * * /home/radius/tools/clear_oracle_log.sh