【翻译自mos文章】在不同操作系统下的UNIX命令

翻译自:Unix Commands on Different OS‘s (文档 ID 293561.1)

Unix Commands on Different OS‘s

General Commands AIX FreeBSD HP-UX LINUX(RedHat) Solaris Tru64
Unique host ID hostid   uname -i hostid hostid hostid
Administrator smit   sam linuxconf admintool sysman
Performance monitor top

monitor

top top

glance

top top top
System activity reporter sar sa sar sar {sysstat} sar /usr/opt/svr4/bin/sar
Virtual Memory statistics vmstat vmstat vmstat vmstat vmstat vmstat
I/O statistics iostat iostat iostat iostat {sysstat} iostat iostat
Error logs alog -o -t boot

errpt

dmesg dmesg dmesg  dmesg uerf -R -o full
Physical RAM 1TB   4TB 64 GB {>2.3.24} 16TB 4TB
Shared Memory 2.75GB   8TB sysctl kernel.shmmax    
Process Data Space 2GB   4GB 900 MB    
Swap device /dev/hd6 /dev/ad0s1b /dev/vg00/lvol2 /dev/sda2 /dev/vx/dsk/swapvol /dev/rz0b
Swap file type /etc/swapspaces swap swap partition type 82  swap raw
Display swap size lsps -a swapinfo swapinfo -a free swap -l swapon -s
Activate Swap swapon -a swapon -a swapon -a swapon -a swap -a swapon -a
TCP/IP AIX   HP-UX LINUX(RedHat) Solaris Tru64
Network IP configuration lsattr -E -l inet0 /etc/rc.conf /etc/rc.config.d/netconf /etc/sysconfig/network-scripts/  /etc/hostname.*

/etc/inet/*

/etc/defaultrouter

/etc/rc.config
Hosts IP addresses /etc/hosts /etc/hosts /etc/hosts /etc/hosts /etc/inet/hosts /etc/hosts
Name service switch /etc/netsvc.conf /etc/host.conf /etc/nsswitch.conf /etc/nsswitch.conf /etc/nsswitch.conf /etc/svc.conf
Network parameters no -a sysctl ndd -h sysctl -a | grep net ndd /dev/[tcp|ip] ?  
Routing daemon gated routed gated routed in.routed routed
NIC Configurations ifconfig -a ifconfig -a lanscan -v ifconfig -a ifconfig -a ifconfig -a
Secondary IP Address ifconfig en0 alias IP  ifconfig xl0 alias IP ifconfig lan0:1 IP  modprobe ip_alias

ifconfig eth0:1 IP

ifconfig hme0:1 IP up ifconfig ln0 alias
Login prompt HERALD @

/etc/security/login.cfg 

  telnetd -b /etc/issue  /etc/issue BANNER @

/etc/default/telnetd

/etc/issue
Increase the # of pseudo-terminals odmget -q "attribute=num and uniquetype=pty/pty/pty" PdAt | sed "s/0-64/0-512/" |

odmchange -q "attribute=num and uniquetype=pty/pty/pty" -o PdAt

chdev -l pty0 -anum=256 -P

reboot

  rebuild your kernel with these new values NPTY=# 

NSTRPY=#

reboot

insf -d ptys -n #

insf -d ptym -n #

insf -d pts -s # -e -v

 

cd /dev

./MAKEDEV -v pty

{/etc/system}

set pt_cnt = #   {SYSV}

set npty = #      {BSD}

{/etc/iu.ap}

ptsl 0 # ldterm ttcompat

halt

boot -r

cd /dev

./MAKEDEV PTY_1

Maximum # of ptys 512   {MAXUSERS} 256 176                {BSD}

3000              {SYSV}

8192
Remote Shell remsh

rsh

rsh remsh rsh rsh rsh
YP/NIS service binder /usr/lib/netsvc/yp/ypbind  /usr/sbin/ypbind /usr/lib/netsvc/yp/ypbind  /sbin/ypbind /usr/lib/netsvc/yp/ypbind /usr/sbin/ypbind
System Files AIX FreeBSD HP-UX LINUX(RedHat) Solaris Tru64
NFS exported /etc/exports /etc/exports /etc/exports /etc/exports /etc/dfs/dfstab

/etc/dfs/sharetab

/etc/exports
NFS Client mounted directories /etc/xtab   /etc/xtab /var/lib/nfs/xtab /etc/rmtab /var/adm/mountdtab
Max File System 128 GB   128 GB 2 TB  1 TB

8000 TB {vxfs}

128 GB {<= 3.2G}

512 GB {>= 4.0}

16 TB {advfs}

Max File Size 64 GB   128 GB 2 GB     {512B block size} 

8192 GB  {8KB block size} 

1 TB

2 GB {=<2.5.1}

128 GB {<= 3.2G}

512 GB {>= 4.0}

16 TB {advfs}

Max # File Descriptors 64 K   60~ K sysctl fs.file-max 64 K 64 K
DISK/LVM Commands AIX FreeBSD
HP-UX:Disk &Filesystem LINUX(RedHat) SOLARIS Tru64
Filesystem table /etc/filesystems /etc/fstab /etc/fstab /etc/fstab /etc/vfstab /etc/fstab
Free disk blocks df -k df -k bdf df -k df -k df -k
Device listing lsdev -C   /sbin/ioscan cat /proc/devices sysdef  
Disk information bootinfo -s hdisk#  fdisk -v ad0 diskinfo /dev/rdsk/c#t#d# cat /proc/scsi/scsi0/sda/model format -d c#t#d#

format>current

format>inquiry

file /dev/rrz0c
Disk Label lspv -l hdisk# disklabel ad0 pvdisplay -v /dev/dsk/C#t#d# fdisk -l prtvtoc disklabel -p rz0
LVM Concepts Partition  sub disk logical extents logical extents sub disk sub disk
  Volume Volume logical volume logical volume Volume Volume
    Plex     Plex Plex
  Volume group   volume group volume group disk group disk group
Journal Filesystem type jfs   vxfs ext3

reiserfs

vxfs advfs
Default volume group /dev/rootvg   /dev/vg00   /dev/vx/dsk/rootdg /dev/vol/rootdg
Display volume group lsvg -l rootvg   vgdisplay -v vg00 vgdisplay -v vxprint -l -g rootdg volprint -l -g rootdg
Modify physical volume chpv   pvchange pvchange    
Prepare physical disk mkdev -c disk -l hdisk#   pvcreate pvcreate vxdiskadd voldiskadd
List physical volume lspv vinum ld pvdisplay pvdisplay vxprint -dl volprint -dl
Remove disk from volume group reducevg   vgreduce vgreduce vxdg rmdisk voldg rmdisk
Move logical volumes to another physical volumes migratepv vinum move -f drive object pvmove pvmove vxassist move volassist move
Create volume group mkvg   vgcreate vgcreate vxdg init voldg init
Remove volume group     vgremove vgremove    
Volume group availability chvg

varyonvg

varyoffvg

  vgchange vgchange    
Restore volume group     vgcfgrestore vgcfgrestore    
Exports volume group exportvg   vgexport vgexport vxdg deport voldg deport
Imports volume group importvg   vgimport vgimport vxdg import voldg import
Volume group listing lsvg   vgscan vgscan    
Change logical volume characteristics  chlv   lvchange lvchange  vxedit set voledit set
List logical volume lslv vinum lv lvdisplay lvdisplay vxprint -vl volprint -vl
Make logical volume mklv   lvcreate lvcreate vxassist make volassist make
Extend logical volume extendlv   lvextend lvextend vxassist growto volassist growto
Reduce logical volume AIX reduce LV   lvreduce lvreduce vxassist shrinkto volassist shrinkto
Remove logical volume rmlv vinum rm vol lvremove lvremove vxedit rm voledit -g rootdg -rf rm vol1
Prepare boot volumes bootlist -m normal   lvlnboot lilo vxbootsetup  
Remove boot volumes     lvrmboot      
Extend File system chfs -a size=# /mt   extendfs /dev/vg00/lvol8

fsadm -F vxfs -b {LE * 1024} /mt

resize2fs

resize_reiserfs

vxva

mkfs -M

 
Reduce/Split mirrors rmlvcopy   lvsplit lvsplit    
Merge mirrors     lvmerge lvmerge    
Create mirrors mklv -c 2 vinum mirror drive lvcreate -m 1   vxassist mirror volassist make vol 100mb mirror=true
Add mirrors mklvcopy lv 2    lvextend -m 1      
Create striped volumes mklv -u 3 -S 64K vinum stripe drive lvcreate -i 3 -I 64 lvcreate -i 3 -I 64 vxassist make vol 100mb layout=raid5 volassist make vol 100mb layout=stripe
System recovery tape mksysb -i /dev/rmt0   /opt/ignite/bin/make_recovery     /usr/sys/bin/btcreate
Backup savevg -i rootvg vinum saveconfig fbackup tar cvf /dev/rst0 / ufsdump vdump
Restore restvg    frecover tar xvf /dev/rst0  ufsrestore vrestore
MISC AIX FreeBSD HP-UX LINUX(RedHat) SOLARIS Tru64
Startup script /etc/rc /etc/rc /sbin/rc /etc/rc.d/rc /etc/init.d /sbin/init.d
Kernel /usr/lib/boot/unix_up /kernel /stand/vmunix /boot/vmlinuz /kernel/genunix /vmunix
Kernel Parameters lsattr -E -l sys0 sysctl -a sysdef

kmtune

kmsystem

sysctl -a sysdef -i sysconfig

dxkerneltuner

Reconfigure the kernel

chdev -l sys0 -a 

cd /sys/i386/conf

vi KERNEL

config KERNEL

cd ../../compile/KERNEL

make depend

make

make install

cd /stand/build

/usr/lbin/sysadm/system_prep -v -s system

vi system

mk_kernel -s system

cd /stand

mv system system.prev

mv vmunix vmunix.prev

mv dlkm dlkm.prev

mv /stand/build/system system

kmupdate /stand/build/vmunix_test

cd /usr/src/linux 

make mrproper

make menuconfig

make dep

make clean

make bzImage

make install

make modules

make modules_install

cp arch/i386/boot/bzImage /boot/vmlinuz-2.2.16

mkinitrd /boot/initrd-2.2.16.img 2.2.16

vi /etc/lilo.conf

lilo

vi /etc/system

reboot

doconfig
List modules genkex kldstat kmadmin -s lsmod modinfo  
Load module   kldload kmadmin -L insmod modload  
Unload module   kldunload kmadmin -U rmmod modunload  
Initialize system install_assist /stand/sysinstall set_parms initial netconf sys-unconfig netsetup
Physical RAM bootinfo -r sysctl hw.physmem grep -i Physical /var/adm/syslog/syslog.log free prtconf uerf | grep memory
Kernel Bits bootinfo -K   getconf KERNEL_BITS getconf WORD_BIT isainfo -kv 64
Crash utility crash crash adb lcrash crash kdbx
Trace System Calls syscalls truss tusc strace truss trace
Machine model uname -m

bootinfo -m

uname -m model

uname -m

uname -m uname -imp uname -p
OS Level oslevel uname -r uname -r uname -r uname -r sizer -v
Run Level who -r   who -r runlevel who -r who -r
Core dump files /var/adm/ras   /var/adm/crash   /var/crash/`uname -n`  
Boot single user Key on service mode/F4

Boot from CD/Tape

Select Maintenance

Limited function Shell

ok boot -s >boot

Interact with IPL ? Y

ISL>hpux -iS

{lilo}

control-x

linux S

{grub}

c

kernel vmlinuz-2.4.9-13 single   ro root=/dev/hda8

initrd /initrd-2.4.9-13.img

boot

ok boot -s >>> boot -fl s
Maintenance mode   ok boot -as >boot

Interact with IPL ? Y

ISL>hpux -lm

  ok boot -as  
Interrupt Key     control-B   Stop-A control-P
Return to console     co   ok go  
Timezone Management /etc/environment

/etc/profile

/etc/localtime /etc/TIMEZONE /etc/sysconfig/clock /etc/TIMEZONE

/etc/default/init

/etc/svid3_tz

timezone

NTP Daemon /etc/ntp.conf

startsrc -s xntpd

/etc/rc.conf {xntpd_enable="YES"}

/etc/rc.network

/etc/rc.config.d/netdaemons

/sbin/init.d/xntpd

/etc/ntp.conf

/etc/rc.d/init.d/xntpd

/etc/inet/ntp.conf

/etc/init.d/xntpd

rcmgr set XNTPD_CONF YES

/sbin/init.d/xntpd

时间: 2024-10-21 14:52:50

【翻译自mos文章】在不同操作系统下的UNIX命令的相关文章

【翻译自mos文章】 11gR1版本 asmcmd的新命令--cp、md_backup、md_restore

11gR1版本 asmcmd的新命令--cp.md_backup.md_restore 参考原文: ASMCMD - New commands in 11gR1 (Doc ID 451900.1) 适用于: Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.1.0.7 [Release 11.1] Information in this document applies to any platform. ***Checke

【翻译自mos文章】rhel 5下禁用SElinux的方法

rhel 5下禁用SElinux的方法: 参考自: How to Disable or set SELinux to Permissive mode (文档 ID 457458.1) Edit /etc/selinux/config ?Change the SELINUX value to "SELINUX=disabled". ?Reboot the server. 在RHEL5.8 的 文本安装过程中,是没有关于selinux的设置的,因此在一个人安装os后,另外一个人去安装ora

【翻译自mos文章】Windows平台下的 Oraagent Memory Leak

来源于: Oraagent Memory Leak (文档 ID 1956840.1) APPLIES TO: Oracle Database - Enterprise Edition - Version 11.2.0.3 and later Information in this document applies to any platform. NOTE: This document is based on the analysis performed in a Windows enviro

【翻译自mos文章】rac数据库中,HC_&lt;SID&gt;.dat文件被其他Oracle_Home下的实例所使用。

rac数据库中,HC_<SID>.dat文件被其他Oracle_Home下的实例所使用. 参考原文: RAC database HC_<SID>.dat is used by instance of different Oracle_Home (Doc ID 1618161.1) 适用于: Oracle Database - Enterprise Edition - Version 11.2.0.0 and later Information in this document ap

【翻译自mos文章】在win2003 sp1下,遇到无法解释的数据库性能下降

翻译自mos文章:在win2003 sp1下,遇到无法解释的数据库性能下降 Unexplained Database Slowdown Seen on Windows 2003 Service Pack 1 (Doc ID 464683.1) Applies to: Oracle Server - Enterprise Edition - Version 9.2.0.1 to 11.1.0.6 [Release 9.2 to 11.1] z*OBSOLETE: Microsoft Windows

【翻译自mos文章】在不使用par file的情况下,export or import 含有大小写表名的表

在不使用par file的情况下,export or import 含有大小写表名的表 参考原文: How to Export or Import Case Sensitive Tables Without Using a Par File (Doc ID 1622134.1)1 适用于: Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.4 [Release 10.2 to 11.2] Information i

【翻译自mos文章】尽管指定了目的地,asmcmd cp命令还是在 +DATA/ASM 下创建文件

尽管指定了目的地,asmcmd cp命令还是在  +DATA/ASM 下创建文件 参考原文: ASMCMD Cp Creates Files In +DATA/ASM Instead Of Destination Specified (Doc ID 1488934.1) 适用于: Oracle Database - Enterprise Edition - Version 11.2.0.3 and later Information in this document applies to any

【翻译自mos文章】当NFS server 宕机后,Oracle 数据库 冻结并且alert 文件里没有任何错误

当NFS server 宕机后,Oracle 数据库 冻结并且alert 文件里没有任何错误 翻译自mos文章:When NFS Server Is Down, Oracle Server Freezes With No Errors In Alert Log File (文档 ID 1316251.1) 适用于: Oracle Server - Enterprise Edition - Version: 10.2.0.4 and later   [Release: 10.2 and later

【翻译自mos文章】在unix/linux中使用文件描述符(File Descriptors)来找回被删掉的文件(数据文件or redo log)

在unix/linux中使用文件描述符(File Descriptors)来找回被删掉的文件(数据文件or redo log) 参考原文: Retrieve deleted files on Unix / Linux using File Descriptors (Doc ID 444749.1) 适用于: Oracle Database - Enterprise Edition - Version 8.1.7.0 to 11.2.0.3 [Release 8.1.7 to 11.2] Linu