一、操作系统查看1
1> 查看操作系统(AIX 文件系统是否合理)
方式: " df -m ,查看所有的文件系统大小 是否>2G"
结果类似下面:
$df -m
Filesystem MB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 2048.00 1980.01 4% 6837 2% /
/dev/hd2 10240.00 8068.59 22% 44971 3% /usr
/dev/hd9var 8192.00 7868.97 4% 7278 1% /var
/dev/hd3 4096.00 3496.39 15% 1019 1% /tmp
/dev/hd1 20480.00 15137.79 27% 3713 1% /home
/proc - - - - - /proc
/dev/hd10opt 20480.00 14830.66 28% 33118 1% /opt
/dev/arch1_lv 207360.00 207320.46 1% 5 1% /arch1
zzrac2:/arch2 208896.00 208858.72 1% 5 1% /arch2
解决方案:
如果不是,需要修改过小的fs
使用命令smitty chfs->change /show characteristic of an enhanced Journaled File System
修改对应的文件系统的大小
二、操作系统查看2
2> 查看操作系统是否打齐补丁( oslevel -s instfix -i )
方式:“oslevel –s 或 insfix –i |grep ML”
结果类似下面:
# oslevel -s
5300-10-02-0943
# instfix -i |grep ML
All filesets for 5.3.0.0_AIX_ML were found.
All filesets for 5300-01_AIX_ML were found.
All filesets for 5300-02_AIX_ML were found.
All filesets for 5300-03_AIX_ML were found.
All filesets for 5300-04_AIX_ML were found.
All filesets for 5300-05_AIX_ML were found.
All filesets for 5300-06_AIX_ML were found.
Not all filesets for 5300-07_AIX_ML were found.
Not all filesets for 5300-08_AIX_ML were found.
Not all filesets for 5300-09_AIX_ML were found.
Not all filesets for 5300-10_AIX_ML were found.
# oslevel -s
5300-06-12-0920
解决方案:
如果不是,则查看到目前版本需要哪些补丁包,(oslevel –rl 5300-10,并通过smitty installp来升级补丁包)
oslevel -rl 5300-10
三、操作系统查看3
3>查看操作系统的rootvg 是否做了mirror ("lsvg -l rootvg"),查看LPS 和PPS是不是1对2的关系
方式:“lsvg -l rootvg”
类似结果:
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 32 32 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 8 8 1 open/syncd /
hd2 jfs2 40 40 1 open/syncd /usr
hd9var jfs2 32 32 1 open/syncd /var
hd3 jfs2 16 16 1 open/syncd /tmp
hd1 jfs2 80 80 1 open/syncd /home
hd10opt jfs2 80 80 1 open/syncd /opt
lg_dumplv sysdump 8 8 1 open/syncd N/A
解决方法:
如果不是1对2的关系(比如上面的列子),而主机的本地磁盘有2块以上,则需要做rootvg的 mirror镜像:
|||||||||||||||||||||||||||||
将两块系统磁盘做镜像:
#smitty extendvg 扩展rootvg,将hdisk1加入到rootvg中
/usr/sbin/extendvg ‘rootvg’ ‘hdisk1’
按图中所示选择,将hdisk1加入到rootvg中,按回车
#smitty mirrorvg 对所选择的VG做镜像。
如上图,将要做镜像的两块硬盘选中,按回车,开始镜像。
上图所示,镜像成功完成。
#bosboot –ad hdisk1 将启动扇区写入hdisk1
#bootlist –m normal rmt0 cd0 hdisk0 hdisk1 改变启动顺序,将hdisk1加入启动序列。 到此镜像完成,两块硬盘将同时工作,互为镜像。
|||||||||||||||||||||||||||||||||||||||||||||
四、操作系统查看4
4、查看bootlist是否正常,推荐从硬盘开始引导:
方式:“# bootlist -m normal –o” 查看是不是包含了镜像的两块本地硬盘
结果应该类似下面
# bootlist -m normal -o
hdisk0 blv=hd5
hdisk1 blv=hd5
否则需要修改bootlist:
修改方式:
如果和预期不符合,可以通过下面的方式来修改:
Diag->task selection->display or change Bootlist
五、操作系统查看5
5、查看AIX参数
原理
调整AIX上的文件缓存
在AIX上,可以通过vmtune命令中的MINPERM和MAXPERM参数,调整系统文件缓存来控制内存交换操作,MINPERM和MAXPERM参数的调整应遵照以下的原则:
当内存中的文件缓存页在MINPERM以下时,内存页交换算法同时交换文件缓存页和程序页(computational pages)。
当内存中的文件缓存页在MAXPERM以上时,内存页交换算法只交换文件缓存页。
当内存中的文件缓存页在MINPERM和MAXPERM之间时,内存页交换算法通常只交换文件缓存页,但如果文件缓存页的交换率大于程序页时,程序页也同样被交换。
MINPERM和MAXPERM参数的缺省值:
MINPERM = ((number of memory page) - 1024)*0.2
MAXPERM = ((number of memory page) - 1024)*0.8
可以用以下命令将MINPERM设为5%的内存页,而MAXPERM设为20%的内存页。
# vmtune -p 5 -P 20 缺省值分别为20%和80%。
在Oracle数据库应用的环境下,可以将MINPERM和MAXPERM分别设为5%和20%甚至更小,从而使内存更多地被用于Oracle的SGA而不是系统的文件缓存。
(查看文件系统内存占用的份额规定,如果oracle 采用裸设备方式存储文件,则文件系统内存分配比率建议为内存的5%-10%)
方式:”nmon”
结果类似下面:
nmon 查看内存的属性
着重关注,Min/Maxperm部分,这一块代表文件系统内存能够占用的部分,建议内存为5(min)-10(max)留给文件系统。
如果不符合:
通过下面的命令来修改文件系统内存使用的阈值:
|||||||||||||||||
修改内存参数:
minperm%=2 初始化把内存的2%给文件内存用 1.4G 归档,ftp 会使用
#vmo -r -o minperm%=5
#vmo -r -o maxclient%=10
#vmo -r -o maxperm%=10
重启后参数才能起作用
|||||||||||||||||||||
六、操作系统查看5
6、查看pagespace是否符合要求,"lsattr -El mem0" "lsps -a"
方式:(lsdev –Cc memory ,lssattr –El mem0,lsps -a)
结果类似下面,可以看到内存的大小为16G,而pagesize为8G
#
# lsdev -Cc memory
L2cache0 Available L2 Cache
mem0 Available Memory
# lsattr -El mem0 (物理内存大小)
goodsize 16384 Amount of usable physical memory in Mbytes False
size 16384 Total amount of physical memory in Mbytes False
如果内存<2G,建议pagespace为内存的两倍
# lsps –a (pagesize大小)
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk0 rootvg 8192MB 1 yes yes lv
解决方法:
如果和预期不一样,尝试修改pagesize大小:
||||||||||||||||||||||
修改以上几个参数。
修改Paging Space空间
#smitty lvm
选择 Paging Space
选择 Change / Show Characteristics of a Paging Space
选择 hd6
在NUMBER of additional logical partitions输入:60
将Paging Space空间扩展为8GB
检查页面空间大小
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk0 rootvg 8192MB 1 yes yes lv
同样方式修改另一台主机的系统参数。
|||||||||||||||||||||||||||
七、操作系统查看7
查看CPU 参数,相关信息是否匹配 “prtconf"
方式: “prtconf"
类似结果如下:
# prtconf
System Model: IBM,8204-E8A
Machine Serial Number: ********
Processor Type: PowerPC_POWER6 (power 芯片类型,为power6)
Processor Implementation Mode: POWER 6
Processor Version: PV_6_Compat
Number Of Processors: 4 (CPU core 个数 4个,即2个双核的物理CPU)
Processor Clock Speed: 3503 MHz (CPU 主频 3.5G)
CPU Type: 64-bit
Kernel Type: 64-bit (内核版本 64位)
LPAR Info: 1 zzrac1
Memory Size: 16384 MB(内存大小16G)
Good Memory Size: 16384 MB
Platform Firmware level: EL350_049
Firmware Version: IBM,EL350_049
Console Login: enable
Auto Restart: true
Full Core: false
Network Information
Host Name: zzrac1
IP Address: 10.220.97.51
Sub Netmask: 255.255.255.0
Gateway: 10.220.97.254
Name Server:
Domain Name:
Paging Space Information
Total Paging Space: 8192MB
Percent Used: 1%
Volume Groups Information
==============================================================================
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 546 248 79..00..00..60..109
==============================================================================
0516-010 : Volume group must be varied on; use varyonvg command.
==============================================================================
0516-010 : Volume group must be varied on; use varyonvg command.
==============================================================================
arch1vg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk5 active 812 1 00..00..00..00..01
==============================================================================
INSTALLED RESOURCE LIST
The following resources are installed on the machine.
+/- = Added or deleted from Resource List.
* = Diagnostic support not available.
解决方法:
如何和产品不符,咨询厂家实际情况并修复问题(更换内存?CPU?)
八、操作系统查看8
查看是否属于夏时制(不要是夏时制)[确认tz那行对应的不是TZ=1而是TZ=BEIST-8]
方法:”more /etc/environment”
类似结果:
# more /etc/environment
# @(#)18
1.25 src/bos/etc/environment/environment, cmdsh, bos53A, a2004_
35B6 8/23/04 04:13:11
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# bos53A src/bos/etc/environment/environment 1.25
#
# Licensed Materials - Property of IBM
#
# (C) COPYRIGHT International Business Machines Corp. 1989,1994
# All Rights Reserved
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
# IBM_PROLOG_END_TAG
#
# COMPONENT_NAME: (CMDSH) Shell related commands
#
# ORIGINS: 27
#
# (C) COPYRIGHT International Business Machines Corp. 1989, 1994
# All Rights Reserved
# Licensed Materials - Property of IBM
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
################################################################
# System wide environment file. This file should only contain
# 1. comment lines which have a # in the first column,
# 2. blank lines, and
# 3. Lines in the form name=value.
#
# WARNING: This file is only for establishing environment variables.
# Execution of commands from this file or any lines other
# than specified above may cause failure of the initialization
# process.
#
# Searching the current directory last is usually a BIG time saver.
# If /usr/ucb is at the beginning of the PATH the BSD version of commands will
# be found.
#
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/us
r/java14/bin
TZ=1
LANG=en_US
LOCPATH=/usr/lib/nls/loc
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
LC__FASTMSG=true
# ODM routines use ODMDIR to determine which objects to operate on
# the default is /etc/objrepos - this is where the device objects
# reside, which are required for hardware configuration
ODMDIR=/etc/objrepos
TERM=vt100
#
解决方法:
||||||||||||||||||
若时区不是”BEIST-8”,则通过smitty chtz 改时区(改完时区之后需要重启才能生效)
Smitty chtz-> Use DAYLIGHT SAVINGS TIME?(选择no)-> CUT (Coordinated Universal Time) Time Zone (选择”(BEIST-8) Peoples Rep. China (CUT +8)”)
|||||||||||||||||||
九、操作系统查看9
检查rac两节点是否时间同步,用“date ”命令查看(首先确认时区要一致)
结论,若不同步, 通过smitty date改 时间
十、数据库查询1
数据库版本检查,是否为最新: 检查数据库版本和crs的版本是否打到最新(10.2.0.5):
方法:
"sqlplus -version", 查看software版本
"crsctl query crs softwareversion" 查看crs版本
类似结果
$ sqlplus -version
SQL*Plus: Release 10.2.0.5.0 – Production
# crsctl query crs softwareversion
CRS software version on node [zzrac1] is [10.2.0.5.0]
解决方案:
||||||||||||||
如果补丁集较低,建议升级补丁:
1>、应用备份数据
2>、升级rac crs
3>、升级oracle software
4>、升级库版本
5>、编译无效的对象
||||||||||||||||
十一、数据库查询2
(数据文件如果采用裸设备的方式)检查是否数据库文件关闭了自动扩展(建议关闭自动扩展)(用toad上去观察)
方案: 使用toad检查问价系统状态
类似结果:
解决方案:
关闭相应的数据文件的自动扩展:
ALTER DATABASE TEMPFILE '/dev/rrac_temp_2G' AUTOEXTEND OFF;
十二、数据库查询3
检查数据库文件是否已经和lv大小相近似(建议扩充文件系统,接近到可扩充的最大文件)
方法:使用toad检查
类似结果
解决方案:(rac_temp_2G对应了8个pp)
# lsvg -l oraclevg
oraclevg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
rac_ocr_raw_1G raw 4 4 1 open/syncd N/A
rac_vote_raw_1G raw 4 4 1 open/syncd N/A
rac_system_2G raw 8 8 1 open/syncd N/A
rac_sysaux_2G raw 8 8 1 open/syncd N/A
rac_undotbs1_2G raw 8 8 1 open/syncd N/A
rac_undotbs2_2G raw 8 8 1 open/syncd N/A
rac_temp_2G raw 8 8 1 open/syncd N/A
rac_users_2G raw 8 8 1 open/syncd N/A
rac_redo11_4G raw 16 16 1 open/syncd N/A
rac_redo12_4G raw 16 16 1 open/syncd N/A
rac_redo31_4G raw 16 16 1 open/syncd N/A
rac_redo32_4G raw 16 16 1 open/syncd N/A
rac_redo21_4G raw 16 16 1 open/syncd N/A
rac_redo22_4G raw 16 16 1 open/syncd N/A
rac_redo41_4G raw 16 16 1 open/syncd N/A
rac_redo42_4G raw 16 16 1 open/syncd N/A
rac_con1_512m raw 2 2 1 open/syncd N/A
rac_con2_512m raw 2 2 1 open/syncd N/A
rac_con3_512m raw 2 2 1 open/syncd N/A
rac_spfile_512m raw 2 2 1 closed/syncd N/A
查看pp大小(1个pp大小为256M)
# lsvg oraclevg
VOLUME GROUP: oraclevg VG IDENTIFIER: 00c976b500004c00000001296240e915
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 6143 (1572608 megabytes)
MAX LVs: 256 FREE PPs: 5951 (1523456 megabytes)
LVs: 20 USED PPs: 192 (49152 megabytes)
OPEN LVs: 19 QUORUM: 2 (Enabled)
TOTAL PVs: 1 VG DESCRIPTORS: 2
STALE PVs: 0 STALE PPs: 0
ACTIVE PVs: 1 AUTO ON: no
Concurrent: Enhanced-Capable Auto-Concurrent: Disabled
VG Mode: Concurrent
Node ID: 1 Active Nodes:
MAX PPs per VG: 28448
MAX PPs per PV: 7112 MAX PVs: 4
LTG size (Dynamic): 1024 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
#
所以rac_temp_2G 可以扩展到2G(8*256M)
如果没有扩展到适应大小,用下面命令:(确认lv大小)
ALTER DATABASE TEMPFILE '/dev/rrac_temp_2G' RESIZE 2000M;
|||||||||||||||||||
收起