Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This is a document that can be used for revision purposes for HP-UX. Kernel
Kernel parms and Hardware. Major numbers (devices) Unix device messages Configuration files Unix Kernel All crash files.
/usr/sbin/sysdef or ioscan fn lsdev dmesg /etc/rc.config.d /stand/vmunix /var/adm/crash
display loaded modules load modules unload modules set kernel parameters
kmadmin kmadmin -s kmadmin -L kmadmin -U kctune (11i) rebuild kernel kctune (11i) sysdef kmtune kmsystem usr/sam/lbin/getkinfo -f /stand/vmunix -o /tmp/kernel.data cd /stand/build /usr/lbin/sysadm/system_prep -s system edit system file /usr/sbin/mk_kernel -s ./system mv /stand/system /stand/system.old mv /stand/vmunix /stand/vmunix.old mv /stand/build/system /stand mv /stand/build/vmunix_test /stand/vmunix shutdown -r 0
re/build kernel
System Information
amount of memory
dmesg |grep -I physical /usr/sam/lbin/getmem /opt/ignite/bin/print_manifest /opt/ignite/bin/print_manifest sam > performance monitors > system properties (detailed) model uname -m pvdisplay -v diskinfo -v /dev/rdsk/c0t4d0 (detailed but no serial number) /opt/ignite/bin/print_manifest ioscan -fn -C disk getconf KERNEL_BITS (11.0) (HPUX < 11.00 all 32 bit) Note: determine if system supports 32/64 bits getconf HW_CPU_SUPP_BITS
Kernel 32 or 64
Display firmware
< 10.20:
1. 2. 3. 4. 5. 6.
At the system prompt, enter "sysdiag" At the DUI prompt, enter "sysmap" At the ENTER MAP prompt, enter "cpumap" Note the PDC Firmware value At the ENTER MAP prompt, enter "exit" At the DUI prompt, enter "exit"
Daemons
NFS daemons
server: rpc.mountd, nfsd client:rpc.statd, lockd /etc/exports netdaemons
Time daemons
/etc/rc.config.d/netdaemons /etc/ntp.conf
Software
adding packages/patch removing packages/patch Listing installed packages/patches verify package/patches Adding packages to depot Removing packages to depot listing packages from depot copy software from one depot to another register software List all files in package configure software
swinstall -s /var/spool/sw swremove swlist -l product PH* (HPUX 10.x) swlist -l patch (HPUX 11) swlist -l -a state swverify swlist -d @ /dev/rmt/0m swremove -d * @ /var/spool/sw swlist -d @ /dev/rmt/0 swlist -d @ /var/spool/sw swcopy -s /dev/rmt/0 @ /var/spool/sw swreg swlist -l <file> swconfig
Log Files
messages syslog mail cron boot sam log
n/a /var/adm/syslog/syslog.log /var/adm/syslog/mail.log /var/adm/cron/log /var/adm/syslog/syslog.log /var/sam/log/samlog
Accounts
displaying users adding a user
cat /etc/passwd logins useradd
sam
Network
displaying NIC speeds setting NIC speeds display routing table displaying network interfaces Lan device config (interface name, state, mjr number, Hardware path, mac address) Lan Diag tool (like a netstat I and s and more) setup dns name service switch file
ndd -get ndd -set lanadmin netstat -rn lanscan (all) ifconfig lan0 (individual) lanscan Landiag or lanadmin /etc/resolv.conf /etc/nsswitch.conf
NFS Configuration
display nfs shares create nfs share
showmount -e localhost cat /etc/xtab /etc/rc.config.d/nfsconf (edit) /etc/exports (edit file & add share) exportfs -a /etc/rc.config.d/nfsconf (edit) exportfs -au (unshare all) exportfs -u /home/vallep /etc/exports (edit file & remove file) /sbin/init.d/nfs.core start /sbin/init.d/nfs.server start /sbin/init.d/nfs.client start /sbin/init.d/nfs.client stop /sbin/init.d/nfs.server stop /sbin/init.d/nfs.core stop ps -ef|grep exportfs -a nfsstat
nfs start
Sam
Sam Log file location
/usr/local/log/samlog
Console
Root only on console
/etc/securetty
Boot (ISL)
Boot a particular kernel (standalone) Boot in stanalone Boot multi-user
Hpux is /stand/vmunix Hpux is boot Hpux lm boot
Disk
setting the boot device format floppy drive mount/unmount floppy mount/unmount CDROM create boot disk or recovery tape boot cdrom/diskette (single user) boot into maintenace mode Display the LIF area (Logical Interchange Format) Display characteristics of a tape drive
setboot -p setboot -a n/a n/a mount -rF cdfs /dev/mnt recovery tape (preview): make_tape_recovery -v -I -x inc_entire=vg00 >boot pri Interact with IPL? Y ISL>hpux -is >boot pri Interact with IPL? Y ISL>hpux -lm lifls -l /dev/dsk/c0t6d0 lssf /dev/rmt/c4t1d0DESTn
Logical Volume Manager see hpux logical volume manager for lvm commands
mountable drives lvm drives exported drives mounted exported drives create a filesystem create a exported filesystem
/etc/fstab /etc/lvmtab /etc/exports /etc/xtab
block devices raw devices info on disk drives df k change interleave factor A number of disk that have to be running in order for a VG to mount
Swap
Display swap information
swapinfo (display in Kb) swapinfo -m (display in Mb) swapinfo -tm (total and Mb) Create logical volume or filesystem swapon <device>|<logical device> swapon -p 3 <device>|<logical device> update /etc/fstab Note: -p = priority swap number
Adding swap
Removing swap
Misc
startup shutdown init status 0 1 2 3 4 5 6 determine the runlevel obtain default run level start xwindows ntp setup force a fsck page size (memory) initialize system Timezone update /dev directory remove device
4Kb set_parms initial /etc/TIMEZONE Class: insf -C tape Recreate deleted link: insf -H 0.1.0 -e rmsf who -r shutdown -h -g0 -y (halt) shutdown -r -g0 -y (reboot)
lsdev /etc/securetty