General Commands Aix Freebsd Hp-Ux

You might also like

Download as xls, pdf, or txt
Download as xls, pdf, or txt
You are on page 1of 8

General Commands AIX FreeBSD HP-UX

Unique host ID hostid uname -i


Administrator smit sam

top top
Performance monitor monitor top glance

System activity reporter sar sa sar

Virtual Memory statistics vmstat vmstat vmstat


I/O statistics iostat iostat iostat
alog -o -t boot
Error logs errpt dmesg dmesg
Physical RAM 1TB 4TB
Shared Memory 2.75GB 8TB
Process Data Space 2GB 4GB
Swap device /dev/hd6 /dev/ad0s1b /dev/vg00/lvol2
Swap file type /etc/swapspaces swap swap
Display swap size lsps -a swapinfo swapinfo -a
Activate Swap swapon -a swapon -a swapon -a
TCP/IP AIX HP-UX

Network IP configuration lsattr -E -l inet0 /etc/rc.conf /etc/rc.config.d/netconf


Hosts IP addresses /etc/hosts /etc/hosts /etc/hosts
Name service switch /etc/netsvc.conf /etc/host.conf /etc/nsswitch.conf
Network parameters no -a sysctl ndd -h
Routing daemon gated routed gated
NIC Configurations ifconfig -a ifconfig -a lanscan -v

Secondary IP Address ifconfig en0 alias IP  ifconfig xl0 alias IP ifconfig lan0:1 IP 
HERALD @
Login prompt /etc/security/login.cfg  telnetd -b /etc/issue 

odmget -q "attribute=num
and
uniquetype=pty/pty/pty" rebuild your kernel with
PdAt | sed "s/0-64/0-512/" | these new values NPTY=# 
odmchange -q
"attribute=num and
uniquetype=pty/pty/pty" -o
PdAt NSTRPY=#

chdev -l pty0 -anum=256


-P reboot
reboot

insf -d ptys -n #
insf -d ptym -n #
Increase the # of pseudo- insf -d pts -s # -e -v
terminals
Increase the # of pseudo-
terminals

Maximum # of ptys 512 {MAXUSERS}


remsh
Remote Shell rsh rsh remsh

YP/NIS service binder /usr/lib/netsvc/yp/ypbind  /usr/sbin/ypbind /usr/lib/netsvc/yp/ypbind 


System Files AIX FreeBSD HP-UX

NFS exported /etc/exports /etc/exports /etc/exports


NFS Client mounted
directories /etc/xtab /etc/xtab

Max File System 128 GB 128 GB

Max File Size 64 GB 128 GB


Max # File Descriptors 64 K 60~ K

DISK/LVM Commands AIX FreeBSD HP-UX:Disk &Filesystem


Filesystem table /etc/filesystems /etc/fstab /etc/fstab
Free disk blocks df -k df -k bdf
Device listing lsdev -C /sbin/ioscan

Disk information bootinfo -s hdisk#  fdisk -v ad0 diskinfo /dev/rdsk/c#t#d#


pvdisplay -v
Disk Label lspv -l hdisk# disklabel ad0 /dev/dsk/C#t#d#
LVM Concepts Partition  sub disk logical extents
Volume Volume logical volume
Plex
Volume group volume group

Journal Filesystem type jfs vxfs


Default volume group /dev/rootvg /dev/vg00
Display volume group lsvg -l rootvg vgdisplay -v vg00
Modify physical volume chpv pvchange
Prepare physical disk mkdev -c disk -l hdisk# pvcreate
List physical volume lspv vinum ld pvdisplay
Remove disk from volume
group reducevg vgreduce

Move logical volumes to


another physical volumes migratepv vinum move -f drive object pvmove
Create volume group mkvg vgcreate
Remove volume group vgremove
chvg
varyonvg
Volume group availability varyoffvg vgchange
Restore volume group vgcfgrestore
Exports volume group exportvg vgexport
Imports volume group importvg vgimport
Volume group listing lsvg vgscan
Change logical volume
characteristics  chlv lvchange
List logical volume lslv vinum lv lvdisplay
Make logical volume mklv lvcreate
Extend logical volume extendlv lvextend
Reduce logical volume AIX reduce LV lvreduce

Remove logical volume rmlv vinum rm vol lvremove


Prepare boot volumes bootlist -m normal lvlnboot
Remove boot volumes lvrmboot
extendfs /dev/vg00/lvol8
fsadm -F vxfs -b
Extend File system chfs -a size=# /mt {LE * 1024} /mt
Reduce/Split mirrors rmlvcopy lvsplit
Merge mirrors lvmerge

Create mirrors mklv -c 2 vinum mirror drive lvcreate -m 1


Add mirrors mklvcopy lv 2  lvextend -m 1

Create striped volumes mklv -u 3 -S 64K vinum stripe drive lvcreate


/ -i 3 -I 64
opt/ignite/bin/make_recove
System recovery tape mksysb -i /dev/rmt0 ry
Backup savevg -i rootvg vinum saveconfig fbackup
Restore restvg  frecover
MISC AIX FreeBSD HP-UX
Startup script /etc/rc /etc/rc /sbin/rc
Kernel /usr/lib/boot/unix_up /kernel /stand/vmunix
sysdef
kmtune
Kernel Parameters lsattr -E -l sys0 sysctl -a kmsystem
cd /sys/i386/conf cd
/ /stand/build
usr/lbin/sysadm/system_pr
vi KERNEL ep -v -s system
config KERNEL vi system

cd ../../compile/KERNEL mk_kernel -s system


make depend cd /stand

make mv system system.prev


make install mv vmunix vmunix.prev
mv dlkm dlkm.prev
mv /stand/build/system
system

kmupdate
/stand/build/vmunix_test

Reconfigure the kernel chdev -l sys0 -a 


List modules genkex kldstat kmadmin -s
Load module kldload kmadmin -L
Unload module kldunload kmadmin -U
Initialize system install_assist /stand/sysinstall set_parms initial

grep -i Physical
Physical RAM bootinfo -r sysctl hw.physmem /var/adm/syslog/syslog.log
Kernel Bits bootinfo -K getconf KERNEL_BITS
Crash utility crash crash adb
Trace System Calls syscalls truss tusc
uname -m model
Machine model bootinfo -m uname -m uname -m
OS Level oslevel uname -r uname -r
Run Level who -r who -r
Core dump files /var/adm/ras /var/adm/crash

Key on service mode/F4 <TT>BOOT


Boot from CD/Tape Interact with IPL ? Y
Select Maintenance ISL>hpux -iS
Limited function Shell

Boot single user ok boot -s


<TT>BOOT
Interact with IPL ? Y
Maintenance mode ok boot -as ISL>hpux -lm
Interrupt Key control-B
Return to console co
/etc/environment
Timezone Management /etc/profile /etc/localtime /etc/TIMEZONE
/etc/rc.conf
/etc/ntp.conf {xntpd_enable="YES"} /etc/rc.config.d/netdaemons
NTP Daemon startsrc -s xntpd /etc/rc.network /sbin/init.d/xntpd
LINUX(RedHat) Solaris Tru64
hostid hostid hostid
linuxconf admintool sysman

top top top

sar {sysstat} sar /usr/opt/svr4/bin/sar

vmstat vmstat vmstat


iostat {sysstat} iostat iostat

dmesg  dmesg uerf -R -o full


64 GB {>2.3.24} 16TB 4TB
sysctl kernel.shmmax
900 MB
/dev/sda2 /dev/vx/dsk/swapvol /dev/rz0b
partition type 82  swap raw
free swap -l swapon -s
swapon -a swap -a swapon -a
LINUX(RedHat) Solaris Tru64
/etc/hostname.*
/etc/sysconfig/network- /etc/inet/*
scripts/  /etc/defaultrouter /etc/rc.config
/etc/hosts /etc/inet/hosts /etc/hosts
/etc/nsswitch.conf /etc/nsswitch.conf /etc/svc.conf
sysctl -a | grep net ndd /dev/[tcp|ip] ?
routed in.routed routed
ifconfig -a ifconfig -a ifconfig -a
modprobe ip_alias
ifconfig eth0:1 IP ifconfig hme0:1 IP up ifconfig ln0 alias
BANNER @
/etc/issue /etc/default/telnetd /etc/issue

cd /dev {/etc/system} cd /dev

./MAKEDEV -v pty set pt_cnt = #   {SYSV} ./MAKEDEV PTY_1


set npty = #      {BSD}

{/etc/iu.ap}

ptsl 0 # ldterm ttcompat

halt
boot -r
176                {BSD}
256 3000              {SYSV} 8192

rsh rsh rsh

/sbin/ypbind /usr/lib/netsvc/yp/ypbind /usr/sbin/ypbind


LINUX(RedHat) Solaris Tru64
/etc/dfs/dfstab
/etc/exports /etc/dfs/sharetab /etc/exports

/var/lib/nfs/xtab /etc/rmtab /var/adm/mountdtab


1 TB 128 GB {<= 3.2G}
8000 TB {vxfs} 512 GB {>= 4.0}
2 TB  16 TB {advfs}

2 GB     {512B block size}  1 TB 128 GB {<= 3.2G}


8192 GB  {8KB block
size}  2 GB {=<2.5.1} 512 GB {>= 4.0}
16 TB {advfs}
sysctl fs.file-max 64 K 64 K

LINUX(RedHat) SOLARIS Tru64


/etc/fstab /etc/vfstab /etc/fstab
df -k df -k df -k
cat /proc/devices sysdef
format -d c#t#d#
cat format>current
/proc/scsi/scsi0/sda/model format>inquiry file /dev/rrz0c

fdisk -l prtvtoc disklabel -p rz0


logical extents sub disk sub disk
logical volume Volume Volume
Plex Plex
volume group disk group disk group

ext3
reiserfs vxfs advfs
/dev/vx/dsk/rootdg /dev/vol/rootdg
vgdisplay -v vxprint -l -g rootdg volprint -l -g rootdg
pvchange
pvcreate vxdiskadd voldiskadd
pvdisplay vxprint -dl volprint -dl

vgreduce vxdg rmdisk voldg rmdisk

pvmove vxassist move volassist move


vgcreate vxdg init voldg init
vgremove
vgchange
vgcfgrestore
vgexport vxdg deport voldg deport
vgimport vxdg import voldg import
vgscan

lvchange  vxedit set voledit set


lvdisplay vxprint -vl volprint -vl
lvcreate vxassist make volassist make
lvextend vxassist growto volassist growto
lvreduce vxassist shrinkto volassist shrinkto
voledit -g rootdg -rf rm
lvremove vxedit rm vol1
lilo vxbootsetup

resize2fs vxva

resize_reiserfs mkfs -M
lvsplit
lvmerge
volassist make vol 100mb
vxassist mirror mirror=true

vxassist make vol 100mb volassist make vol 100mb


lvcreate -i 3 -I 64 layout=raid5 layout=stripe

/usr/sys/bin/btcreate
tar cvf /dev/rst0 / ufsdump vdump
tar xvf /dev/rst0  ufsrestore vrestore
LINUX(RedHat) SOLARIS Tru64
/etc/rc.d/rc /etc/init.d /sbin/init.d
/boot/vmlinuz /kernel/genunix /vmunix
sysconfig
dxkerneltuner
sysctl -a sysdef -i
cd /usr/src/linux  vi /etc/system

make mrproper  reboot


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
doconfig
lsmod modinfo
insmod modload
rmmod modunload
netconf sys-unconfig netsetup

free prtconf uerf | grep memory


getconf WORD_BIT isainfo -kv 64
lcrash crash kdbx
strace truss trace

uname -m uname -imp uname -p


uname -r uname -r sizer -v
runlevel who -r who -r
/var/crash/`uname -n`

{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 <TT>> tt s< -fl boot>

ok boot -as
Stop-A control-P
ok go
/etc/TIMEZONE /etc/svid3_tz
/etc/sysconfig/clock /etc/default/init timezone
rcmgr set XNTPD_CONF 
/etc/ntp.conf /etc/inet/ntp.conf YES
/etc/rc.d/init.d/xntpd /etc/init.d/xntpd /sbin/init.d/xntpd

You might also like