Chinaunix首页 | 论坛 | 博客
  • 博客访问: 323096
  • 博文数量: 173
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1060
  • 用 户 组: 普通用户
  • 注册时间: 2014-11-09 16:23
文章分类

全部博文(173)

文章存档

2015年(66)

2014年(107)

我的朋友

分类: LINUX

2015-01-16 13:45:19

通过kfed自动获取磁盘信息的小脚本

编译KFED

[@rac lib]$cd $ORACLE_HOME/rdbms/lib

[oracle@rac lib]$ pwd

/u01/app/oracle/product/10.2.0/db_1/rdbms/lib

[oracle@rac lib]$ make -f ins_rdbms.mk ikfed

Linking KFED utility (kfed)

rm -f/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/kfed

gcc -o/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/kfed-L
/u01/app/oracle/product/10.2.0/db_1/rdbms/lib/-L/u01/app
/oracle/product/10.2.0/db_1/lib/ -L/u01/app/oracle/product/
10.2.0/db_1/lib/stubs/-L/usr/lib -lirc /u01/app/oracle/product/
10.2.0/db_1/lib/s0main.o/u01/app/
oracle/product/10.2.0/db_1/rdbms/lib/sskfeded.o/u01/app/
oracle/product/10.2.0/db_1/rdbms/lib/skfedpt.o /u01/app/
oracle/product/10.2.0/db_1/rdbms/lib/defopt.o -ldbtoo
10-lclntsh  `cat/u01/app/oracle/product/10.2.0/db_1/lib/
ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10-ln10 -
lnnz10 -lnl10 -lnro10 `cat /u01/app/oracle/product/10.2.0/
db_1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10-
ln10 -lnnz10 -lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10
-lgeneric10 -lmm -lsnls10 -lnls10  -lcore10 -lsnls10 -lnls10
-lcore10 -lsnls10-lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -
lnls10 -lcore10 -lnls10 `cat/u01/app/oracle/product/10.2.0/db_
1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10-ln10
-lnnz10 -lnl10 -lnro10 `cat/u01/app/oracle/product/10.2.0/db_
1/lib/ldflags`    -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10-ln10 -lnnz10
-lnl10 -lclient10 -lnnetd10 -lvsn10 -lcommon10 -lgeneric10  
-lsnls10 -lnls10  -lcore10-lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10
-lxml10 -lcore10 -lunls10 -lsnls10-lnls10 -lcore10 -lnls10 -lclient10
-lnnetd10 -lvsn10 -lcommon10 -lgeneric10 -lsnls10 -lnls10  -lcore10
-lsnls10 -lnls10 -lcore10 -lsnls10-lnls10 -lxml10 -lcore10 -lunls10
-lsnls10 -lnls10 -lcore10 -lnls10   `cat/u01/app/oracle/product/10.2.0/
db_1/lib/sysliblist`-Wl,-rpath,/u01/app/oracle/product/10.2.0/db_1/lib
-lm    `cat /u01/app/oracle/product/10.2.0/db_1/lib/sysliblist`-ldl -lm  
-L/u01/app/oracle/product/10.2.0/db_1/lib

mv -f/u01/app/oracle/product/10.2.0/db_1/bin/kfed/u01/app/oracle/
product/10.2.0/db_1/bin/kfedO

mv: cannot stat`/u01/app/oracle/product/10.2.0/db_1/bin/kfed':
No such file or directory

make: [ikfed] Error 1 (ignored)

mv /u01/app/oracle/product/10.2.0/db_1/rdbms/lib/kfed/u01/
app/oracle/product/10.2.0/db_1/bin/kfed

chmod 751/u01/app/oracle/product/10.2.0/db_1/bin/kfed

[oracle@rac lib]$

--查看KFED 位置

[oracle@rac lib]$ which kfed

/u01/app/oracle/product/10.2.0/db_1/bin/kfed

这里记录一个脚本,方便以后获取信息:

#########################################################

#! /bin/sh

 /tmp/kfed_DH.out /tmp/kfed_FS.out /tmp/kfed_BK.out /tmp/
kfed_FD.out /tmp/kfed_DD.out /tmp/kfed_PST.out

for i in `ls /dev/raw/raw*`

do

echo $i >> /tmp/kfed_DH.out

/u02/app/oracle/proct/10.2.0/db_1/bin/kfed read $i >>
/tmp/kfed_DH.out

echo $i >> /tmp/kfed_FS.out

/u02/app/oracle/product/10.2.0/db_1/bin/kfed read $i blkn=1
>> /tmp/kfed_FS.out

echo $i >> /tmp/kfed_BK.out

/u02/app/oracle/product/10.2.0/db_1/bin/kfed read $i aun=1
blkn=254 >> /tmp/kfed_BK.out

echo $i >> /tmp/kfed_FD.out

/u02/app/oracle/product/10.2.0/db_1/bin/kfed read $i aun=2
blkn=1 >> /tmp/kfed_FD.out

echo $i >> /tmp/kfed_DD.out

/u02/app/oracle/product/10.2.0/db_1/bin/kfed read $i aun=2
blkn=2 >> /tmp/kfed_DD.out

echo $i >> /tmp/kfed_PST.out

/u02/app/oracle/product/10.2.0/db_1/bin/kfed read $i aun=1
blkn=2 >> /tmp/kfed_PST.out

done

#####################################################

~

    • 本文来自:
阅读(655) | 评论(0) | 转发(0) |
0

上一篇:linux安全关机脚本

下一篇:nginx+django+uwsgi

给主人留下些什么吧!~~