HP UX Common+Unix+Commands
HP UX Common+Unix+Commands
swap
Solaris Red Hat HP
swap -l cat /proc/swaps (detailed) swapinfo (displayed in KB)
display swap swap -s swapon -s swapinfo -m (display in Mb)
swapinfo -tm (total / Mb)
Create logical volume or filesystem
mkfile 5m device:
/var/swapfile create partition with fdisk (type 82) swapon <device> | -f <logical device>
swap -a /var/swapfile file: swapon -p 3 <device> | -f <logical
dd if=/dev/zero of=/var/swapfile bs=1024 device>
adding swap update /etc/vfstab count=65536
update /etc/fstab
mkswap <device>|<file>
swapon <device>|<file> Note: -p = priority swap number
update /etc/fstab
update /etc/vfstab swapoff <device>|<file> remove entry from /etc/fstab
removing swap swap -d reboot
Remove device or file as normal
sysinfo
List Raw Partitions n/a raw -qa n/a
tunefs tune2fs tunefs
Tune Filesystems
fstyp -v <device> tune2fs -l /dev/sda1
isainfo -kv (solaris 9+) uname -a
isalist (sparc v9 will be listed first) uname -m getconf KERNEL_BITS ( version 11)
getconf -a |grep -i 'long_bit'
Kernel 32 or 64 HPUX < version 11 all 32 bit
servers:
truss -p <pid> strace -p <pid> download and install tusc
Trace system calls
tusc -p <pid>
n/a /proc/interrupts n/a
Display IRQ, IO ports and
/proc/ioports
DMA
/proc/dma
Services
NFS
Disk
Kernel Modules
No reboot (dynamically):
set kernel parameters
echo "250 32000 100 28" >
/proc/sys/kernel/sem
echo "536870912" > /proc/sys/kernel/shmmax
echo "4096" > /proc/sys/kernel/shmmni
echo "2097152" > /proc/sys/kernel/shmall
etc.............................................
cat /etc/system sysctl -a kctune (11i only)
sysdef -i cat /etc/sysctl.conf sysdef
ipcs -a kmtune
display kernel cat /proc/sys/kernel/sem kmsystem
parameters cat /proc/sys/kernel/shmmax /usr/sam/lbin/getkinfo -f /stand/vmunix -o /tmp/kernel.data
etc...................................
ipcs -a
cd /usr/src/linux-2.4
edit and update file then edit Makefile (change EXTRAVERSION) cd /stand/build
reboot: make mrproper /usr/lbin/sysadm/system_prep -s system
/etc/system backup .config edit system file
make xconfig /usr/sbin/mk_kernel -s ./system
make dep mv /stand/system /stand/system.old
build kernel
make bzImage mv /stand/vmunix /stand/vmunix.old
make modules mv /stand/build/system /stand
move new kernel mv /stand/build/vmunix_test /stand/vmunix
make modules_install reboot
change lilo/grub config file
reboot
Networking
Patching / Software
Accounts
NTP
Log Files
Security
Misc
/etc/nodename
change the hostname /etc/hostname.<interface>
/etc/inet/hosts
/etc/inet/ipnodes