AIX
|
HP-UX
|
LINUX(RedHat)
|
Solaris
| |
Unique host ID
|
hostid
|
uname -i
|
hostid
|
hostid
|
Administrator
|
smit
|
sam
|
linuxconf
|
admintool
|
Performance monitor
|
top
monitor |
top
glance |
top
|
top
|
System activity reporter
|
sar
|
sar
|
sar {sysstat}
|
sar
|
Virtual Memory statistics
|
vmstat
|
vmstat
|
vmstat
|
vmstat
|
I/O statistics
|
iostat
|
iostat
|
iostat {sysstat}
|
iostat
|
Error logs
|
alog -o -t boot
errpt |
dmesg
|
dmesg
|
dmesg
|
Physical RAM
|
1TB
|
4TB
|
64 GB {>2.3.24}
|
16TB
|
Shared Memory
|
2.75GB
|
8TB
|
sysctl kernel.shmmax
| |
Process Data Space
|
2GB
|
4GB
|
900 MB
| |
Swap device
|
/dev/hd6
|
/dev/vg00/lvol2
|
/dev/sda2
|
/dev/vx/dsk/swapvol
|
Swap file type
|
/etc/swapspaces
|
swap
|
partition type 82
|
swap
|
Display swap size
|
lsps -a
|
swapinfo -a
|
free
|
swap -l
|
Activate Swap
|
swapon -a
|
swapon -a
|
swapon -a
|
swap -a
|
AIX
|
HP-UX
|
LINUX(RedHat)
|
Solaris
| |
Network IP configuration
|
lsattr -E -l inet0
|
/etc/rc.config.d/netconf
|
/etc/sysconfig/network-scripts/
|
/etc/hostname.*
/etc/inet/* /etc/defaultrouter |
Hosts IP addresses
|
/etc/hosts
|
/etc/hosts
|
/etc/hosts
|
/etc/inet/hosts
|
Name service switch
|
/etc/netsvc.conf
|
/etc/nsswitch.conf
|
/etc/nsswitch.conf
|
/etc/nsswitch.conf
|
Network parameters
|
no -a
|
ndd -h
|
sysctl -a | grep net
|
ndd /dev/[tcp|ip] ?
|
Routing daemon
|
gated
|
gated
|
routed
|
in.routed
|
NIC Configurations
|
ifconfig -a
|
lanscan -v
|
ifconfig -a
|
ifconfig -a
|
Secondary IP Address
|
ifconfig en0 alias IP
|
ifconfig lan0:1 IP
|
modprobe ip_alias
ifconfig eth0:1 IP |
ifconfig hme0:1 IP up
|
Login prompt
|
HERALD @
/etc/security/login.cfg |
telnetd -b /etc/issue
|
/etc/issue
|
BANNER @
/etc/default/telnetd |
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 |
Maximum # of ptys
|
512
|
{MAXUSERS}
|
256
|
176 {BSD}
3000 {SYSV} |
Remote Shell
|
remsh
rsh |
remsh
|
rsh
|
rsh
|
YP/NIS service binder
|
/usr/lib/netsvc/yp/ypbind
|
/usr/lib/netsvc/yp/ypbind
|
/sbin/ypbind
|
/usr/lib/netsvc/yp/ypbind
|
AIX
|
HP-UX
|
LINUX(RedHat)
|
Solaris
| |
NFS exported
|
/etc/exports
|
/etc/exports
|
/etc/exports
|
/etc/dfs/dfstab
/etc/dfs/sharetab |
NFS Client mounted directories
|
/etc/xtab
|
/etc/xtab
|
/var/lib/nfs/xtab
|
/etc/rmtab
|
Max File System
|
128 GB
|
128 GB
|
2 TB
|
1 TB
8000 TB {vxfs} |
Max File Size
|
64 GB
|
128 GB
|
2 GB {512B block size}
8192 GB {8KB block size} |
1 TB
2 GB {=<2.5.1} |
Max # File Descriptors
|
64 K
|
60~ K
|
sysctl fs.file-max
|
64 K
|
AIX
|
LINUX(RedHat)
|
SOLARIS
| ||
Filesystem table
|
/etc/filesystems
|
/etc/fstab
|
/etc/fstab
|
/etc/vfstab
|
Free disk blocks
|
df -k
|
bdf
|
df -k
|
df -k
|
Device listing
|
lsdev -C
|
/sbin/ioscan
|
cat /proc/devices
|
sysdef
|
Disk information
|
bootinfo -s hdisk#
|
diskinfo /dev/rdsk/c#t#d#
|
cat /proc/scsi/scsi0/sda/model
|
format -d c#t#d#
format>current format>inquiry |
Disk Label
|
lspv -l hdisk#
|
pvdisplay -v /dev/dsk/C#t#d#
|
fdisk -l
|
prtvtoc
|
LVM Concepts
|
Partition
|
logical extents
|
logical extents
|
sub disk
|
Volume
|
logical volume
|
logical volume
|
Volume
| |
Plex
| ||||
Volume group
|
volume group
|
volume group
|
disk group
| |
Journal Filesystem type
|
jfs
|
vxfs
|
ext3
reiserfs |
vxfs
|
Default volume group
|
/dev/rootvg
|
/dev/vg00
|
/dev/vx/dsk/rootdg
| |
Display volume group
|
lsvg -l rootvg
|
vgdisplay -v vg00
|
vgdisplay -v
|
vxprint -l -g rootdg
|
Modify physical volume
|
chpv
|
pvchange
|
pvchange
| |
Prepare physical disk
|
mkdev -c disk -l hdisk#
|
pvcreate
|
pvcreate
|
vxdiskadd
|
List physical volume
|
lspv
|
pvdisplay
|
pvdisplay
|
vxprint -dl
|
Remove disk from volume group
|
reducevg
|
vgreduce
|
vgreduce
|
vxdg rmdisk
|
Move logical volumes to another physical volumes
|
migratepv
|
pvmove
|
pvmove
|
vxassist move
|
Create volume group
|
mkvg
|
vgcreate
|
vgcreate
|
vxdg 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
|
Imports volume group
|
importvg
|
vgimport
|
vgimport
|
vxdg import
|
Volume group listing
|
lsvg
|
vgscan
|
vgscan
| |
Change logical volume characteristics
|
chlv
|
lvchange
|
lvchange
|
vxedit set
|
List logical volume
|
lslv
|
lvdisplay
|
lvdisplay
|
vxprint -vl
|
Make logical volume
|
mklv
|
lvcreate
|
lvcreate
|
vxassist make
|
Extend logical volume
|
extendlv
|
lvextend
|
lvextend
|
vxassist growto
|
Reduce logical volume
|
lvreduce
|
lvreduce
|
vxassist shrinkto
| |
Remove logical volume
|
rmlv
|
lvremove
|
lvremove
|
vxedit rm
|
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
|
lvcreate -m 1
|
vxassist mirror
| |
Add mirrors
|
mklvcopy lv 2
|
lvextend -m 1
| ||
Create striped volumes
|
mklv -u 3 -S 64K
|
lvcreate -i 3 -I 64
|
lvcreate -i 3 -I 64
|
vxassist make vol 100mb layout=raid5
|
System recovery tape
|
mksysb -i /dev/rmt0
|
/opt/ignite/bin/make_recovery
| ||
Backup
|
savevg -i rootvg
|
fbackup
|
tar cvf /dev/rst0 /
|
ufsdump
|
Restore
|
restvg
|
frecover
|
tar xvf /dev/rst0
|
ufsrestore
|
AIX
|
HP-UX
|
LINUX(RedHat)
|
SOLARIS
| |
Startup script
|
/etc/rc
|
/sbin/rc
|
/etc/rc.d/rc
|
/etc/init.d
|
Kernel
|
/usr/lib/boot/unix_up
|
/stand/vmunix
|
/boot/vmlinuz
|
/kernel/genunix
|
Kernel Parameters
|
lsattr -E -l sys0
|
sysdef
kmtune kmsystem |
sysctl -a
|
sysdef -i
|
Reconfigure the kernel
| chdev -l sys0 -a |
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 |
List modules
|
genkex
|
kmadmin -s
|
lsmod
|
modinfo
|
Load module
|
kmadmin -L
|
insmod
|
modload
| |
Unload module
|
kmadmin -U
|
rmmod
|
modunload
| |
Initialize system
|
install_assist
|
set_parms initial
|
netconf
|
sys-unconfig
|
Physical RAM
|
bootinfo -r
|
grep -i Physical /var/adm/syslog/syslog.log
|
free
|
prtconf
|
Kernel Bits
|
bootinfo -K
|
getconf KERNEL_BITS
|
getconf WORD_BIT
|
isainfo -kv
|
Crash utility
|
crash
|
adb
|
crash
| |
Trace System Calls
|
syscalls
|
strace
|
truss
| |
Machine model
|
uname -m
bootinfo -m |
model
uname -m |
uname -m
|
uname -imp
|
OS Level
|
oslevel
|
uname -r
|
uname -r
|
uname -r
|
Run Level
|
who -r
|
who -r
|
runlevel
|
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 |
>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
|
Maintenance mode
|
>boot
Interact with IPL ? Y ISL>hpux -lm |
ok boot -as
| ||
Interrupt Key
|
control-B
|
Stop-A
| ||
Return to console
|
co
|
ok go
| ||
Timezone Management
|
/etc/environment
/etc/profile |
/etc/TIMEZONE
|
/etc/sysconfig/clock
|
/etc/TIMEZONE
/etc/default/init |
NTP Daemon
|
/etc/ntp.conf
startsrc -s xntpd |
/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 |
Saturday, April 2, 2016
Unix Commands on Different OS's
Labels:
Unix Commands on Different OS's
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment