星期三, 5月 01, 2013

Aix , HP UX , Linux , Solaris ( 硬體/ OS版本檢查/ OS Patches檢查 ) 各指令

主要就現在比較常用的UNIX/LINUX OS上的硬體及軟體情況檢查指令進行介紹,指令來自於ORACLE在各OS的安裝手冊.

 

一、AIX情況
1
、檢查記憶體情況
To determine the physical RAM size, enter the following command:

# /usr/sbin/lsattr -E -l sys0 -a realmem

2、檢查Swap
To determine the size of the configured swap space, enter the following command:

# /usr/sbin/lsps -a

3、檢查TMP目錄的空間
To determine the amount of disk space available in the /tmp directory, enter the following command:

# df -k /tmp

4、檢查系統架構
To determine whether the system architecture can run the software, enter the following command:

# /usr/bin/getconf HARDWARE_BITMODE
64

5、檢查作業系統版本
To determine the version of AIX installed, enter the following command:

# oslevel -r
6
、檢查軟體安裝情況
To determine whether the required filesets are installed and committed, enter a command similar to the following:

# lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat
bos.perf.libperfstat bos.perf.proctools
7
、檢查patch是否安裝
To determine whether an APAR is installed, enter a command similar to the following:

# /usr/sbin/instfix -i -k "IY63133 IY64978 IY63366 IY64691 IY65001 IY64737
IY64361 IY65305 IY58350 IY63533"

二、HP-UX PA-RISC
1
、檢查記憶體情況
To determine the physical RAM size, enter the following command:

# grep "Physical:" /var/adm/syslog/syslog.log

2、檢查Swap情況
To determine the size of the configured swap space, enter the following command:

# /usr/sbin/swapinfo -a

3、檢查/TMP目錄可用空間
To determine the amount of disk space available in the /tmp directory, enter the following command:

# bdf /tmp

4、檢查系統架構
To determine whether the system architecture can run the software, enter the following command:

# /bin/getconf KERNEL_BITS

5、檢查作業系統版本
To determine which version of HP-UX is installed, enter the following command:

# uname -a
HP-UX hostname B.11.11 U 9000/800 109444686 unlimited-user license

In this example, the version of HP-UX 11i is 11.11.

6、檢查軟體安裝情況
To determine whether a bundle, product, or fileset is installed, enter a command similar to the following, where level is bundle, product, or fileset:

# /usr/sbin/swlist -l level | more

7、檢查patch安裝情況
To determine whether a patch is installed, enter a command similar to the following:

# /usr/sbin/swlist -l patch | grep PHSS_28880

Alternatively, to list all installed patches, enter the following command:

# /usr/sbin/swlist -l patch | more

三、hp-ux Itanium

0、檢查機器資訊
# /usr/contrib/bin/machinfo

下面顯示的資訊:
CPU info:
Number of CPUs = 2
Clock speed = 1500 MHz
Bus speed = 400 MT/s
CPUID registers
vendor information = "GenuineIntel"
processor serial number = 0x0000000000000000
processor version info = 0x000000001f020204
architecture revision: 0
processor family: 31 Intel(R) Itanium 2 Family Processors
processor model: 2 Intel(R) Itanium 2 processor
processor revision: 2 Stepping A2
largest CPUID reg: 4
processor capabilities = 0x0000000000000001
implements long branch: 1
Bus features
implemented = 0xbdf0000060000000
selected = 0x0000000040000000
Bus Lock Signal masked

Cache info:
L1 Instruction: size = 16 KB, associativity = 4
L1 Data: size = 16 KB, associativity = 4
L2 Unified: size = 256 KB, associativity = 8
L3 Unified: size = 4096 KB, associativity = 8

Memory = 4084 MB (3.988281 GB)

Firmware info:
Firmware revision = 03.17
FP SWA driver revision: 1.18
IPMI is supported on this system.
BMC version: 3.52

Platform info:
model string = "ia64 hp server rx4640"
machine id number = f03ea6ce-365c-11db-b2e5-6f774364478f
machine serial number = SGH4629FXB

OS info:
sysname = HP-UX
nodename = xxx
release = B.11.23
version = U (unlimited-user license)
machine = ia64
idnumber = 4030637774
vmunix _release_version:
@(#) $Revision: vmunix: B11.23_LR FLAVOR=perf Fri Aug 29 22:35:38 PDT 2003 $


1
、檢查記憶體情況
To determine the physical RAM size, enter the following command:

# /usr/contrib/bin/machinfo | grep -i Memory
2
、檢查Swap空間
To determine the size of the configured swap space, enter the following command:

# /usr/sbin/swapinfo -a
3
、檢查/TMP目錄空間情況

To determine the amount of disk space available in the /tmp directory, enter the following command:

# bdf /tmp

4、檢查系統架構
To determine whether the system architecture can run the software, enter the following command:

# /bin/getconf KERNEL_BITS

5、檢查作業系統版本
To determine which version of HP-UX is installed, enter the following command:

# uname -a
HP-UX hostname B.11.23 ia64 109444686 unlimited-user license

In this example, the version of HP-UX 11i is 11.23.

6、檢查軟體安裝情況
To determine whether a bundle, product, or fileset is installed, enter a command similar to the following, where level is bundle, product, or fileset:

# /usr/sbin/swlist -l level | more

7、檢查patch安裝情況
To determine whether a patch is installed, enter a command similar to the following:

# /usr/sbin/swlist -l patch | grep PHSS_33279

Alternatively, to list all installed patches, enter the following command:

# /usr/sbin/swlist -l patch | more

參考:
Oracle® Database Installation Guide 10g Release 2 (10.2) for hp-ux Itanium Part Number B25293-01

四、LINUX系統
1
、檢查記憶體資訊
To determine the physical RAM size, enter the following command:

# grep MemTotal /proc/meminfo
2
、檢查Swap資訊
To determine the size of the configured swap space, enter the following command:

# grep SwapTotal /proc/meminfo

3、檢查可用的記憶體和Swap情況
To determine the available RAM and swap space, enter the following command:

# free
4
、檢查/TMP目錄空間情況
To determine the amount of disk space available in the /tmp directory, enter the following command:

# df -k /tmp

5、檢查LINUX分發商及版本
To determine which distribution and version of Linux is installed, enter the following command:

# cat /proc/version

6、檢查LINUX內核
To determine whether the required kernel is installed, enter the following command:

# uname -r

The following is sample output displayed by running this command on a Red Hat Enterprise Linux 3.0 system:

2.4.21-27.EL
7
、檢查套裝軟體情況
To determine whether the required packages are installed, enter commands similar to the following:

# rpm -q package_name

五、Solaris Operating System (SPARC 64-Bit)
1
、檢查記憶體資訊
To determine the physical RAM size, enter the following command:

# /usr/sbin/prtconf | grep "Memory size"

2、檢查Swap情況
To determine the size of the configured swap space, enter the following command:

# /usr/sbin/swap -s
3
、檢查/TMP目錄空間情況
To determine the amount of disk space available in the /tmp directory, enter the following command:

# df -k /tmp
# df -h /tmp (on Solaris 10)

4、檢查架構信息
To determine whether the system architecture can run the software, enter the following command:

# /bin/isainfo -kv

Note:
The following is the expected output of this command:
64-bit sparcv9 kernel modules
5
、檢查作業系統的版本
To determine which version of Solaris is installed, enter the following command:

# uname -r
5.9
I
n this example, the version shown is Solaris 9 (5.9). If necessary, refer to your operating system documentation for information about upgrading the operating system.
6
、判斷套裝軟體安裝情況
To determine whether the required packages are installed, enter a command similar to the following:

# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot
SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt

7
、判斷patch安裝情況
To determine whether an operating system patch is installed, enter a command similar to the following:

# /usr/sbin/patchadd -p | grep patch_number(without version number)

For example, to determine if any version of the 111713 patch is istalled, use the follwing command:

# /usr/sbin/patchadd -p | grep 111713

 

 

 

沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...