Oracle数据库维护时需要用到的各种unix操作系统命令
Oracle数据库维护时需要用到的各种unix操作系统命令
大家平时在维护oracle时,在各种操作系统下,都会用到一些unix操作系统命令来查看系统相关的信息,
详细的可以在附件中下载PDF格式
内 存:
-------
AIX: bootinfo -r
lsattr -E -lmem0
/usr/sbin/lsattr -E -l sys0 -a realmem
or use a tool as "topas" or "nmon" (these are utilities)
Linux: cat /proc/meminfo
/usr/sbin/dmesg | grep "Physical"
free (the free command)
HP: /usr/sam/lbin/getmem
grep MemTotal /proc/meminfo
/etc/dmesg | grep -i phys
wc -c /dev/mem
or us a tool as "glance", like entering "glance -m" from prompt (is a utility)
Solaris: /usr/sbin/prtconf | grep "Memory size"
Tru64: /bin/vmstat -P | grep "Total Physical Memory"
交换页面:
----------
AIX: /usr/sbin/lsps -a
HP: /usr/sbin/swapinfo -a
Solaris: /usr/sbin/swap -l
Linux: /sbin/swapon -s
cat /proc/swaps
cat /proc/meminfo
操作系统版本:
--------------
HP: uname -a
Linux: cat /proc/version
Solaris: uname -a
cat /etc/release (or other way to view that file, like "more /etc/release")
Tru64: /usr/sbin/sizer -v
AIX: oslevel -r
lslpp -h bos.rte
AIX firmware:
lsmcode -c display the system firmware level and service processor
lsmcode -r -d scraid0 display the adapter microcode levels for a RAID adapter scraid0
lsmcode -A display the microcode level for all supported devices
prtconf shows many setting including memory, firmware, serial# etc..
CPU信息:
---------
HP: ioscan -kfnC processor
getconf CPU_VERSION
getconf CPU_CHIP_TYPE
model
AIX: prtconf | grep proc
pmcycles -m
lsattr -El procx (x is 0,2, etc..)
lscfg | grep proc
Linux: cat /proc/cpuinfo
Solaris: psrinfo -v
prtconf
系统补丁:
----------
AIX: Is a certain fix (APAR) installed?
instfix -ik APAR_number
instfix -a -ivk APAR_number
To determine your platform. firmware level, at the command prompt, type:
lscfg -vp | grep -p Platform
The last six digits of the ROM level represent the platform. firmware date in the format, YYMMDD.
HP: /usr/sbin/swlist -l patch
swlist | grep patch
Linux: rpm -qa
Solaris: showrev -p
pkginfo -i package_name
Tru64: /usr/sbin/dupatch -track -type kit
网卡信息:
---------
AIX: lsdev -Cc adapter
lsdev -Cc adapter | grep ent
lsdev -Cc if
lsattr -E -l ent1
ifconfig -a
Solaris: prtconf -D / prtconf -pv / prtconf | grep "card"
prtdiag | grep "card"
svcs -x
ifconfig -a (up plumb)
光驱挂载:
----------
AIX:
----
# mount -r -v cdrfs /dev/cd0 /cdrom
SuSE Linux:
-----------
# mount -t iso9660 /dev/cdrom /cdrom
# mount -t iso9660 /dev/cdrom /media/cdrom
Redhat Linux:
-------------
# mount -t iso9660 /dev/cdrom /media/cdrom
Solaris:
--------
# mount -r -F hsfs /dev/dsk/c0t6d0s2 /cdrom
HPUX:
-----
mount -F cdfs -o rr /dev/dsk/c1t2d0 /cdrom
Other commands on Linux:
------------------------
Sometimes on some Linux, and some scsi CDROM devices, you might try
# mount /dev/sr0 /mount_point
# mount -t iso9660 /dev/sr0 /mount_point