關於在運行Oracle的環境下部署OSW具體好處不再多說,只需要知曉,在日常Oracle定位各類故障,osw的數據可以協助診斷問題。MOS很多文檔也多處提到需要osw的監控數據。
一、前期資料准備
1.1 OSW介質下載:
在MOS下載OSW,文檔 OSWatcher(包括:[視頻]) (文檔 ID 1526578.1) 有提供下載鏈接。目前我這里下載最新的oswbb811.tar。
1.2 OSW安裝配置:
在文檔 OS Watcher User's Guide (文檔 ID 1531223.1)中,有介紹OSW的安裝配置和使用。
二、實際安裝配置步驟
實際上安裝配置非常簡單,需要先下載介質:oswbb811.tar **2.1創建目錄並賦權**mkdir -p /opt/osw
chown oracle:oinstall /opt/osw
2.2將介質上傳並解壓
將oswbb811.tar介質上傳到/opt/osw/目錄下,
cd /opt/osw
tar xvf oswbb811.tar
chmod 744 *
2.3啟動osw,設置保留每60s采集一次,保存期限48h,后台運行
cd oswbb
nohup ./startOSWbb.sh 60 48 &
驗證正常運行osw:
[oracle@rac1-server oswbb]$ ps -ef|grep osw
oracle 1041 745 0 11:03 pts/3 00:00:00 /bin/sh ./OSWatcherFM.sh 48 /opt/osw/oswbb/archive
oracle 13924 29774 0 11:28 pts/3 00:00:00 grep osw
[oracle@rac1-server archive]$ ps -ef|grep osw
oracle 1041 745 0 11:03 pts/3 00:00:01 /bin/sh ./OSWatcherFM.sh 48 /opt/osw/oswbb/archive
oracle 4825 745 0 15:29 pts/3 00:00:00 /bin/sh ./vmsub.sh /opt/osw/oswbb/archive/oswvmstat/rac1-server_vmstat_17.10.27.1500.dat vmstat 1 3 1
oracle 4827 745 0 15:29 pts/3 00:00:00 /bin/sh ./mpsub.sh /opt/osw/oswbb/archive/oswmpstat/rac1-server_mpstat_17.10.27.1500.dat mpstat -P ALL 1 2 1
oracle 4833 745 0 15:29 pts/3 00:00:00 /bin/sh ./iosub.sh /opt/osw/oswbb/archive/oswiostat/rac1-server_iostat_17.10.27.1500.dat iostat -xk 1 3 1
oracle 4838 745 0 15:29 pts/3 00:00:00 /bin/sh ./xtop.sh /opt/osw/oswbb/archive/oswtop/rac1-server_top_17.10.27.1500.dat 1
oracle 4869 29774 0 15:29 pts/3 00:00:00 grep osw
可以到/opt/osw/oswbb/archive目錄下查看生成各類數據的文件夾:
[oracle@rac1-server archive]$ pwd
/opt/osw/oswbb/archive
[oracle@rac1-server archive]$ ls -lrth
total 44K
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 11:03 oswprvtnet
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 11:03 oswifconfig
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 11:03 oswcpuinfo
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 15:00 oswvmstat
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 15:00 oswtop
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 15:00 oswslabinfo
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 15:00 oswps
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 15:00 oswnetstat
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 15:00 oswmpstat
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 15:00 oswmeminfo
drwxr-xr-x 2 oracle oinstall 4.0K Oct 27 15:00 oswiostat
至此,完成osw安裝部署。