免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4767 | 回复: 7
打印 上一主题 下一主题

[新手入门] AIX,HP—UX,Tru64,Solaris,Linux命令比较 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-07-15 15:38 |只看该作者 |倒序浏览
判断操作系统版本:

Platform               Operating System Version                          Command

---------------------------------------

AIX4.3.3       4.3.3                                                      $ oslevel -r

AIX5.1          5.1                                                         $ oslevel -r

HP                HP-UX version 11.0 (64-bit).                     $ uname -a

Linux            SuSE Linux Enterprise Server

                     7 (or SLES-7) withkernel

                     2.4.7, and glibc 2.2.2.

                     Note: In addition to this

                     distribution, Oracle

                     Corporation works with other

                     Linux distribution vendors

                     to certify Oracle products

                     with their default kernel

                     and OS utilities.                                         $ uname -a

Solaris           32-Bit 2.6 (5.6),

                     7 (5.7) or 8 (5.                                      $ uname -a

Solaris           64-Bit 8 (5.                                                  $ uname -a

Tru64            5.1 or 5.1A                                              $ /usr/sbin/sizer -v



确定系统中得内存:

Platform                             Command

---------------------------------------

AIX                            $ /usr/sbin/lsattr -E -l sys0 -a realmem  or lscfg -vp

Linux                          $ /usr/sbin/dmesg | grep "hysical:"

HP                              $ grep MemTotal /proc/meminfo  or cstm->sel->map->infolog

Solaris                         $ /usr/sbin/prtconf | grep "Memory size"

Tru64                          $ /bin/vmstat -P | grep "Total Physical Memory" or /var/adm/messages



查看各平台CPU:

Platform                       Command

---------------------------------------

AIX                             # lsdev -Cc processor

                                   # lsattr -El proc0

HP-UX                         # ioscan -knfC processor

Tru64                          # psrinfo -v

Solaris                          # psrinfo -v

Linuix                          # dmesg





确定swap区:

Platform                             Command

---------------------------------------

AIX                            $ /usr/sbin/lsps -a

HP                              $ /usr/sbin/swapinfo -a

Linux                          $ /sbin/swapon -s

Tru64                          $ /sbin/swapon -s

Solaris                         $ /usr/sbin/swap -1



确定操作系统的补丁:

Platform                             Command

---------------------------------------

AIX                            $ instfix -a -ivk APAR_number

HP                              $ /usr/sbin/swlist -l patch

Linux                          $ rpm -qa

Solaris 32-bit               $ pkginfo -i package name

Solaris 64-bit               $ showrev -p

Tru64                          $ /usr/sbin/dupatch -track -type kit



确定操作系统的软件包:

---------------------------------------

Platform                             Command

AIX                            $ lslpp -l os_package

Solaris                         $ pkginfo -i os_package

Tru64                          $ setld -i |grep os_package





关于cluster:

Platform                             Command

---------------------------------------

AIX                            HACMP

                                   $ /usr/bin/lssrc -ls grpsvcs

                                   Note: Verify that the CLSTRMGR_cluster_id has number of

                                   providers equal to the number of nodes.      

                                   PSSP 3.4

                                   $ /usr/bin/lssrc -ls hags

                                   Note: Verify that css has the correct number of nodes. There

                                   should also be a local provider.

HP                              $ /usr/sbin/cmviewcl -v

Linux                          $ ps -efl | egrep ‘watchdogd|oracm’

                                   ■ if all of watchdogd and oracm program appears in the

                                      process list, Oracle Cluster Management Software is running.

                                   ■ if all of watchdogd and oracm program does not appear

                                      in the process list, restart the Oracle Cluster Management Software.

Solaris                         $ ps -ef | grep clustd

                                   ■ if the clustd program appears in the process list, clustd is running.

                                   ■ if the clustd program does not appear in the process list,

                                      restart the Cluster Membership Monitor.

Tru64                          $ /usr/sbin/clu_get_info

                                   Note: Verify that the correct number of cluster members are

                                   configured. Member state for all nodes should be "up".

                                   #asemgr (菜单式)



各平台使用CD-ROM:

---------------------------------------

Platform                          Command

AIX                             # lsdev -Cc cdrom

                                   # mkdir /cdrom

                                   # mount -rv cdrfs /dev/cd0 /cdrom

                                   # umount /cdrom

                                   

HP-UX                         $ ioscan -fun -C disk

                                    example:

disk 10 10/12/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-5701TA /dev/dsk/c4t2d0 /dev/rdsk/c4t2d0

vi /etc/pfs_fstab file,add item "device_file mount_point filesystem_type translation_method"

                                   example : "/dev/dsk/c4t2d0 /SD_CDROM pfs-rrip xlat=unix 1 0"

                         # nohup /usr/sbin/pfs_mountd &

                                  # nohup /usr/sbin/pfsd &

                                   # /usr/sbin/pfs_mount /SD_CDROM

                                   # /usr/sbin/pfs_umount /SD_CDROM



Linuix                          # ps -aux | grep automount

                                   # eject

                                   # vi /etc/auto.master

                                   # su root

                                   # mkdir /cdrom

                                   # mount -t iso9660 /dev/cdrom /cdrom

                                   # umount /cdrom

                                                        

Solaris                          # cd /

                                   # eject

                                   # mkdir /cdrom

                                   # mount -r -F hsfs /dev/dsk/c0t6d0s0 /cdrom

                                   # umount /cdrom

                                   



Tru64                          # ls -l /dev/disk/cdrom*c

                                   # mkdir /cdrom

                                   # mount -t cdfs -r -o nodefperm,noversion,rrip /dev/disk/cdrom0c /cdrom

                            # umount /cdrom

                                   

操作系统备份(磁带):

AIX                     mksysb

HP                       make_recovery –Acv

Linux                  

Solaris                  

Tru64                   btcrteate;

                            init 1,mount –a,vdump -0uf /dev/nrmt0h /,vdump -0uf /dev/nrmt0h /usr ,(tru5.x的磁带文件为/dev/tape/tape*);



磁带的使用

---------------------------------------

platform                磁带设备文件(倒带)              磁带设备文件(不倒带)

AIX                      /dev/rmt0                                          /dev/rmt0.1

HP-UX                  /dev/0m                                      /dev/0mn

Solaris                   /dev/rmt/0                                              /dev/rmt/0n

Tru64                   /dev/rmt0h,/dev/tape/tape*           /dev/nrmt0h,/dev/ntape/tape*

Linux                    /dev/rmt/0                                              /dev/rmt/0n



磁盘及卷管理(较为复杂,简单罗列AIX何HP-UX命令对比):

项目                     AIX                      HP-UX           

列出卷组              lsvg                      displayvg

列出物理卷           lspv                      pvdisplay

列出逻辑卷           lslv                       lvdisplay

创建卷组              mkvg                    vgcreate

创建物理卷           mkdev                  pvcreate

创建逻辑卷           mklv                     lvcreate

导出卷组              exportvg                vgexport

导入卷组              importvg               vgimport

扩展卷组              extendvg               vgextend

缩减卷组              reducevg               vgreduce

激活卷组              arryonvg               vgchange –a y

关闭卷组              arryoffvg               vgchange –a n



各平台文件系统的fstab

AIX                      /etc/filesystems

HP-UX                  /etc/fstab

Tru64                   /etc/fstab

solaris                   /etc/vfstab

linux                     /etc/fstab

进入控制台管理(这个说法不是很准确,各个系统对此定义都不相同):

AIX                      启动时在出现键盘(图标or keyboard)之后,扬声器(图标or speaker)之前,按1键(字符界面)或者F1(图形界面)。SMS

HP-UX                  Ctrl+b进入,键入“co”退出。GSP、MP

Tru64                   只能shutdown –h now关闭后进入。SRM

solaris                   sopt+a



各系统菜单化管理程序接口

AIX                      smit,smitty

HP-UX                  sam

Tru64                   sysman

solaris                  



安装oracle时设置oracle用户的PATH变量:

Platform                      Paths

---------------------------------------

AIX                     $ORACLE_HOME/bin,/usr/bin,/etc,/usr/lbin,/usr/bin/X11,and /usr/local/bin, if it exists

HP                       $ORACLE_HOME/bin,/usr/bin,/etc,/usr/bin/X11,and /usr/local/bin, if it exists

Linux                   $ORACLE_HOME/bin,/usr/bin,/bin,/usr/bin/X11/,and /usr/local/bin, if it exists

Solaris                  $ORACLE_HOME/bin,/usr/ccs/bin,/usr/bin,/etc,/usr/openwin/bin, and /usr/local/bin,if it exists

Tru64                   $ORACLE_HOME/bin, /usr/bin,/etc, /usr/bin/X11, and /usr/local/bin, if it exists



各平台创建设备文件:

AIX                      cfgmgr

HP-UX                  insf –e

Tru64                   mknod(4.0),dsfmgr -K

solaris                  


各个系统提供的命令很多,对完成同一任务也有几种不同做法。

论坛徽章:
0
2 [报告]
发表于 2010-07-15 16:56 |只看该作者
这个不是原创,但是也可以算是精华了,呵呵。

论坛徽章:
0
3 [报告]
发表于 2010-07-15 19:03 |只看该作者
不错,可以作为命令参考.

论坛徽章:
0
4 [报告]
发表于 2010-07-15 19:20 |只看该作者
激活或关闭卷组,是varyonvg and varyoffvg

论坛徽章:
0
5 [报告]
发表于 2010-07-16 01:05 |只看该作者
收藏了

论坛徽章:
0
6 [报告]
发表于 2010-07-16 11:55 |只看该作者
有比较就是好

论坛徽章:
20
CU大牛徽章
日期:2013-04-17 11:48:26羊年新春福章
日期:2015-03-10 22:39:202015年中国系统架构师大会
日期:2015-06-29 16:11:282015亚冠之平阳省
日期:2015-07-31 09:19:042015七夕节徽章
日期:2015-08-21 11:06:17IT运维版块每日发帖之星
日期:2015-09-30 06:20:002015亚冠之柏太阳神
日期:2015-10-19 20:29:5915-16赛季CBA联赛之天津
日期:2016-11-29 14:03:4315-16赛季CBA联赛之北控
日期:2016-12-24 20:51:492015年辞旧岁徽章
日期:2015-03-03 16:54:15双鱼座
日期:2015-01-12 20:58:532014年中国系统架构师大会
日期:2014-10-14 15:59:00
7 [报告]
发表于 2010-07-17 22:25 |只看该作者
学习学习了

论坛徽章:
0
8 [报告]
发表于 2010-07-18 08:43 |只看该作者
不错,可以作为命令参考.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP