检查常用UNIX系统硬件及软件情况的命令

主要就现在比较常用的UNIX/LINUX平台上的硬件及软件情况检查命令进行介绍,命令来源于ORACLE在个平台的安装手册.


一、AIX情况
1、检查内存情况
To determine the physical RAM size, enter the following command:

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

2、检查交换区
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、查看补丁是否安装
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、检查交换内存情况
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、查看补丁安装情况
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
---(查看某一目录下所有文件及文件夹的大小 du -sk XXX)
0、查看机器信息
# /usr/contrib/bin/machinfo

下面显示的信息:
CPU info:
Number of CPUs = 2
Clock speed = 1500 MHz
Bus speed = 400 MT/s
CPUID registers
vendor informatio

n = "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、查看交换区空间
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、查看补丁安装情况
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、查看交换区信息
To determine the size of the configured swap space, enter the following command:

# grep SwapTotal /proc/meminfo

3、查看可用的内存和交换

区情况
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、查看交换区情况
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
In 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、判断补丁安装情况
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

相关文档
最新文档