hpux pocket survival guide

21
8/9/2019 Hpux Pocket Survival Guide http://slidepdf.com/reader/full/hpux-pocket-survival-guide 1/21 Sys Admin Pocket Survival Guide - HP-UX Home HP-UX Supplement AIX HOW-TO HP-UX 101 sam Text User Interface (TUI) for sys config (GUI version avail if DISPLAY set to working X server). in /usr/sbin SAM is your friend. It should be the first place to try if you are admin from another OS :) Not as good as aix smitty, but better than solaris that have nothing! Use TAB key to move around, space key for select. Arrow key works. --0-- some of the major files location: /etc/hosts /etc/nsswitch.conf /etc/fstab /etc/lvmconf/vgNN (binary files, but see all volume grp here) /sbin/rc.config.d/ /sbin/rc.d/ System Setup ***** Initial system install checklist: ***** Ensure that / and /usr are fairly big, as these are not not expandable unless in single user mode (or maybe onlineJFS). Most other volumes still need to be unmounted before fs can grow, so estimating correct size is pretty important. OnlineJFS should allow fs expansion w/o unmount like AIX, but more money. Get latest of all 4 of BUNDLE11i, HWEnable11i, GoldApp and GoldBase and install them. Factory OS install included the latest release of all the above 4 patch bundles. After bundles, java patches may still be needed. See: http://www.hp.com/products1/unix/java/patches/index.html

Upload: rasasp

Post on 29-May-2018

261 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 1/21

Sys Admin Pocket Survival Guide - HP-UX 

Home HP-UX Supplement AIX

HOW-TO

HP-UX 101

sam

Text User Interface (TUI) for sys config (GUI version avail if DISPLAYset to working X server).in /usr/sbinSAM is your friend. It should be the first place to try if you areadmin from another OS :)Not as good as aix smitty, but better than solaris that have nothing!Use TAB key to move around, space key for select. Arrow key works.

--0--

some of the major files location:/etc/hosts/etc/nsswitch.conf/etc/fstab/etc/lvmconf/vgNN (binary files, but see all volume grp here)/sbin/rc.config.d//sbin/rc.d/

System Setup

***** Initial system install checklist: *****

Ensure that / and /usr are fairly big, as these are not not expandableunless in single user mode (or maybe onlineJFS).Most other volumes still need to be unmounted before fs can grow,so estimating correct size is pretty important.OnlineJFS should allow fs expansion w/o unmount like AIX, but moremoney.

Get latest of all 4 of BUNDLE11i, HWEnable11i, GoldApp and GoldBase andinstall them.Factory OS install included the latest release of all the above 4 patchbundles.

After bundles, java patches may still be needed. See:http://www.hp.com/products1/unix/java/patches/index.html

Page 2: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 2/21

Upgrading OS.Default CD media allow for both initial setup and upgrade.Upgrade has special procedure to install lot of depot first when systemstillrunning. riptide was upgraded from 11.00 to 11.11, seems to run fine.

--------------

Update HP-UX from 10x and 11.0 to 11i:install update-ux software from CD, then run/usr/sbin/update-ux -s /cdrom HPUX11i-OE.

Refer to Install and update guide in "Instant Documentation" CD.

--HP-UX versionsPA-RISC: 10.20 (EOL), 11.00 (11), 11.11 (11i), 11.23 (ca2005/05)

Itanium: 11.20, 11.22, 11.23

Boot Time Troubleshooting

Recovery of unbootable system.Default setup CD has option to do this. It may help whenVxFS has crashed some critical OS partitions.

booting HP-UX machine into single user mode.

http://www.unixhub.com/docs/hpux/hpux_boot.html

(Connect dumb terminal to serial console)

Press and hold ESC at the beginning of the boot process(it should prompt, but if not, just hit ESC like crazy).

In the PDC (firmware processor dependent code), enterBO to boot. (or BO P0 isl), where P0 is the boot device to use,whohwn by SEArch.

When it ask whether to use interactive ISL (initial system load), sayyes.a the ISL prompt, enter :

hpux -is

[ thre is a 'hpux -lm' for maintenance mode alsoit probably doesn't mount the / fs using normal methodand thus VxFS stuff will not work

Page 3: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 3/21

-lm = lvm maint mode, sometime -is won't work when lvm iscorrupted.

-lq = lvm, ignore failed mirror driveallow booting of machine when one of the mirrored drivehave failed.

ll = list content of /stand, thus see filename of alternatekernel

usable via eg -lm /stand/vmunix.alternate]

After this, should see these messages and the login prompt:

Boot: disk(scsi.6;0)/stand/vmunix966616+397312+409688 start 0x6c50

Kernel Startup Messages Omitted

INIT: Overriding default level with level 's'

INIT: SINGLE USER MODEWARNING: YOU ARE SUPERUSER!!#

NOTE: The VGA monitor + pc keyboard may show some optinos.Hit F4 to toggle remote management on (with * on it).This makes serial console usable.

When booted in single user mode with corrupted fs,vgchange can be used to tell Veritas Vol Mgrt which device to use.This is sometime needed even in non-mirrored disk.vgchange -a y /dev/vg00lvlnboot -v /dev/vg00

fsck -F vxfs -o full,nolog /dev/vg00/rvol8# fsck for drives that have lot of errors, this method# may give more instructions to cmd of how to do the

cleaning.# by specifying -F vxfs, allow use of intent log

(journaling)# feature of JFS and thus completes much quicker.

************************************************************clear out attention light in front panel

thru serial console session:

^B , enter 2xget into gsp mode (Guardian Service Processor cli)

give access to bios level control of the machine,view vfp (virtual front panel), clear hw err log, etc.

sl # sys loge # errors

Page 4: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 4/21

n # no filterq # quit

co # exit back to console************************************************************

---------- PDC commands ----------

PDC - Processor Dependent CodeAccessed at boot up time by the hardware to boostrap thesystem. Step 1 of booting.Only accessible during boot time.Need to hit any key when prompted in a 10 seconds windowsduring boot process to enter the PDC interaction session.The window is after all hardware has been checked and beforeOS bootstrab process begins.

SEA Search and display bootable device.Booting from CDROM may need to use this to finddevice path to use for booting.

BO boot, use default devBO PRI boot, using primary (default) devBO SEC boot, using secondary disk. Simple to do dual boot.BO 0/0/2/1.15 boot via specific path, see SEA.

IN enter info menuALL display all info, there will be machine model strings

to determin what class of machine it is.eg 9000/800/A500-5X System Name: riptideis A-class. some software like compiler bound to the 800

designation.Class info usually not shown in tag/model info in front os

system :(

ME memory info, tell which bank has what kind of DIMM, vacancy.

---------- ISL commands ----------

ISL - Initial System LoaderInvoked by PDC so that it can load the kernel off /standfrom the hard drive.

Interactions in here allow boot into single user mode, etc.See HOWTO section and hpux command is in ISL.

hpux -is # single user mode. No password req!!hpux -lm # LVM maintenance boot mode.hpux -lm /stand/vmunix.prev # boot via specific kernelhpux ll # list kernels avai in /stand

Page 5: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 5/21

-0-ISL> ?

HELP Help FacilityLS List ISL utilitiesAUTOBOOT Set or clear autoboot flag in stable storageAUTOSEARCH Set or clear autosearch flag in stable storagePRIMPATH Modify primary boot path in stable storageALTPATH Modify alternate boot path in stable storageCONSPATH Modify system console path in stable storageDISPLAY Display boot and console paths in stable storageLSAUTOFL List contents of autoboot fileFASTSIZE Sets or displays FASTSIZE800SUPPORT Boots the s800 Support Kernel from the boot device700SUPPORT Boot the s700 Support Kernel from the boot deviceREADNVM Displays contents of one word of NVMREADSS Displays contents of one word of stable storageLSBATCH List contents of batch fileBATCH Execute commands in batch file

LSEST List contents of EST (Extended Self Test) fileEST Execute commands in EST (Extended Self Test) file

Enter 'LS' to see a list of the ISL utilities.

---------- GSP commands ----------

GSP - Guardian Service Processor.BIOS level command, accessible even when machine isin Power Off state.

Use serial console or LAN console,hit ^Bdefault is unsecured so just press enter for username andpassword to gain GSP> prompt access.Accessible all the time, it will not cause any interruption of runningsystem.If machine gets into boot process, user session to GSP will end.

HE = help, LI in there list commands:

==== GSP Help============================================(Administrator)===AC : Alert display Configuration PC : Remote Power Control

AR : Automatic System Restart config. PG : PaGing parameter setupCA : Configure asynch/serial ports PS : Power management moduleStatusCL : Console Log- view console history RS : Reset System through RSTsignalCO : COnsole- return to console mode SDM : Set Display Mode (hex ortext)CSP : Connect to remote Service Proc. SE : SEssion- log into thesystem

Page 6: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 6/21

DC : Default Configuration SL : Show Logs (chassis codebuffer)DI : DIsconnect remote or LAN console SO : Security options & accesscontrolEL : Enable/disable LAN access SS : System Status of proc.modulesER : Enable/disable Remote/modem TC : Reset via Transfer ofControlHE : Display HElp for menu or command TE : TEll- send a msg. toother usersIT : Inactivity Timeout settings VFP : Virtual Front PaneldisplayLC : LAN configuration WHO : Display connected GSPusersLS : LAN Status XD : Diagnostics and/or Resetof GSPMR : Modem Reset XU : Upgrade the GSP FirmwareMS : Modem Status

-0-

CO return to console mode, exit GSP.contrast to exit, which will logoff a telnet to the LAN console

session.LS, LC Show and configure LAN console settings (IP, hostname, etc),

extremely useful, make sure to configure it!TC Send signal to OS, force it to do a core dump and reboot.

Probably similar to Sun OBP sync cmd.RS Harshes restart of system, no OS interaction, no core.

SUN OBM reset.PC allow turning machine on/off. Can perform power cycle.

GSP and LAN console will remain usable after power off.Contrast to SUN LOM and AIX serial access,just need to have power fed into machine.

PS Monitor status of power supply, fan, etc.

SL Show log, GSP level logging, with timestamp in UTC/GMT.Use this command to clear attention light.

CL Show text message that has been displayed to the console.

VFP display a virtual front panel, a mirror of the LED in front ofmachine.

Random Daily Tasks

changing hostname of a machine

/etc/rc.config.d/netconf # top, see HOSTNAME="name"/etc/hosts

Page 7: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 7/21

/var/adm/inetd.sec # may not be needed.

hostname NEWNAME (use this instead of reboot)

don't use set_parmsam okay, but check files above.

move machine to new subnet, maybe use sam instead of config filechanges for IP/NIC settings or elseneed to edit multiple places.

creating /dev/zero

cd /devmknod zero c 3 0x000004chown bin:sys zero

chmod 666 zero

Change system default timezone:edit /etc/TIMEZONE to be:TZ=PST8PDTexport TZ

Setting up NIS with predefinied list of servers.

/etc/rc.config.d/nameserver ::NIS_DOMAIN-"titaniumleg.com"(verify with domainname, immediate activation via domainnametitaniumleg.com)

/var/yp/secureservers ::10.215.10.255 10.215.10.1710.215.20.255 10.215.20.2110.215.30.255 10.215.30.610.215.40.255 10.215.40.199

/usr/lib/netsvc/yp/ypbind

Note that ypinit can only be used to setup master or slave servernot to init client config.

Page 8: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 8/21

Storage

Disk 

swap/paging

swapinfoswapon /dev/vg01/lvol2 # activate swap partition

/etc/fstab entry:/dev/vg01/lvol2/ swap defaults 0 0 # swap device

/usr/sbin/sam gotoPerformance Monitors -> System Properties

there are tabs for cpu and memory info

Volume Management

creating root and swap volumes (using LVM)

[Adapted from Unix Sys Admin Handbook (USAH) p146.]ioscan -fnC disk # scan for disk dev pathpvcreate -B /dev/rdsk/c3t15d0 # mark disk for use as PV in LVMdd if=/dev/zero of=/dev/rdsk/c3t15d0 bs=64k count=10

# wipe out obsolete LVM marking on diskso that

# pvcreate will not complain, re run

pvcreate cmd

mkdir /dev/vg01mknod /dev/vg01/group c 64 0xNN0000 # c 64 is disk major number

# 0xNN0000 is uniq minor numberhex, try 01, 02, ...

# eg, chk against ls -l/dev/vg*/group

vgcreate -s8 /dev/vg01 /dev/dsk/c3t15d0 # create a new vol grp. w/Phy Extend = 8 mb

mkboot /dev/rdsk/c3t15d0 # make it bootable disk

lvcreate -C y -r n -L 1024 /dev/vg01 # create contiguous dev lvol1size 1024 MBlvcreate -C y -r n -L 1024 /dev/vg01 # ditto, will be named lvol2automatically

lvlnboot -r /dev/vg01/lvol1 # make lvol1 a boot partitionlvlnboot -s /dev/vg01/lvol2 # make lvol2 a swap dev

Page 9: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 9/21

newfs -F vxfs /dev/vg01/rlvol1 # create the fs as veritas fsswapon /dev/vg01/lvol2 # activate swapvi /etc/fstab...

# swap addition like this req disk to have a boot partition, even on2nd disk.# sam may provide easier alternative.# also, may need to set kernel param maxswapchunk which limit max swapsize in byte# calc as swchunk * DEV_BSIZE, whose def are 2048 and 1024, resp.

non "system" volumes can be created as, eg /usr/local:lvcreate /dev/vg00lvextend -L 2000 /dev/vg00/lvol11 # allocate 2 GB for the Log Vol.newfs -F vxfs /dev/vg00/rlvol11 # lvol11 assigned dyn fromabove

Clean up procedure, reverse of create...

lvrmboot -r /dev/vg01 # remove root vol req for the LV.# undo lvlnboot -r and -s

lvremove /dev/vg01/lvol2 # remove the logic vol lvol2 fromvg01lvremove /dev/vg01/lvol1vgremove vg # remove the whole vol grp

bdf # df, berkeley version

growfing the fs:lvdisplay /dev/vg00/lvolX# find out LE valueumount /fsmountlvextend -l le_number /dev/vg00/lvolX # where le_number is new LE value

# or -L sizeInMB (final size)extendfs /dev/vg00/lvolX # will fill up all allocated LE,JFSfsadm -F vxfs size /fsmount # increase fs for onlineJFS.mount /fsmount

unless have onlineJFS, need unmount before extend. /var, /usr needboot intosingle user mode (ISL hpux -is, -lm main mode won't work!)lvextend, extendfs, then reboot to increase such fs.Not sure how to do / !!

 NOTE 

/, /stand and swap require special policy of 'contiguous', and thus cannot be extended!

(They usually correspond to lvol1 to lvol3). Wizar can do it by migrating to another disk 

and if onlineJFS is used.

Setup boot disk mirroring

Page 10: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 10/21

Boot disk mirroring.

Adapted from HP-UX 11i system administration handbook and toolkit, 2nd Ed, byPoniatowski. p140

Here is the procedure to mirror root disk, which uses HPUX native LVM, and not the

Veritas Volume Manager that the OS also ships with.

Warning

While this mirroring software is native to the HP-UX OS, it is an option that requiresmore money.

lvextend -m is the mirroring option that need license to be activated.###### ++ TODO: find out how to determine if machine has license formirroring.###

# eg, existing vg00 is in /dev/dsk/c1t2d0 (0/0/1/1.2.0)# new drive for mirror is /dev/dsk/c2t2d0 (0/0/2/0.2.0)

The /etc/fstab before mirroring is:/dev/vg00/lvol3 / vxfs delaylog 0 1/dev/vg00/lvol1 /stand hfs defaults 0 1/dev/vg00/lvol4 /tmp vxfs delaylog 0 2/dev/vg00/lvol5 /lhome vxfs delaylog 0 2/dev/vg00/lvol6 /opt vxfs delaylog 0 2/dev/vg00/lvol7 /usr vxfs delaylog 0 2/dev/vg00/lvol8 /var vxfs delaylog 0 2ioscan -funC diskpvdisplay /dev/dsk/c1t2d0 # get lvm info of existing disk.pvdisplay /dev/dsk/c2t2d0 # get err, no lvm def on it, rawdisk.

pvcreate -B /dev/rdsk/c2t2d0 # add physical disk to be used byLVMvgextend /dev/vg00 /dev/dsk/c2t2d0 # incorporate new disk toexisting vg00

# do some checkingstrings /etc/lvmtab # see new disk used by lvmlifls /dev/rdsk/c1t2d0 # see lot of boot utillifls /dev/rdsk/c2t2d0 # no boot util, add next...

mkboot /dev/rdsk/c2t2d0 #mkboot -a "hpux -lq" /dev/rdsk/c2t2d0 # SECONDARY disk, add AUTO, lowquorummkboot -a "hpux -lq" /dev/rdsk/c1t2d0 # PRIMARY disk, low quorum (??)

lifls /dev/rdsk/c2t2d0 # see boot util, but not asextensive

# as primary disk. It is ok.

###

Page 11: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 11/21

### The next steps will actually perform the mirror,### and it will fail if -m mirroring option is not activated withvalid license###

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0 # add mirror forlvol1=/standlvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t2d0 # add mirror for lvol2=/(root)lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t2d0 # add mirror forlvol3=(swap)# Repeat for all lvolX...lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t2d0 # add mirror forlvol8=(/var)lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t2d0 # add mirror forlvol7=(/usr)lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t2d0 # add mirror forlvol6=(/opt)lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t2d0 # add mirror forlvol5=(/lhome)

lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t2d0 # add mirror forlvol4=(/tmp)

setboot # check current PDC bootpathsetboot -a 0/0/2/0.2.0 # set PDC> BO SEC (if needed)

###### To undo the mirroring prep work:###

vgreduce /dev/vg00 /dev/dsk/c2t2d0pvremove /dev/rdsk/c2t2d0

###### Replacing a mirror disk 149###

vgcfgrestore -n /dev/vgXX /dev/rdsk/c... # vol grp confrestorevgchange -a y /dev/vgXX # change volgrp to available (-a y)vgsync /dev/vgXX # resynclogical vol invol grp.

###

### Replace mirrored disk boot disk### In addition to normal mirror disk replacements steps above,### add:###

mkboot /dev/rdsk/c.t...mkboot -a "hpux lq" /dev/rdsk/c...

reboot # vgcfgbackup is run automatically on reboot

Page 12: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 12/21

Other Volume Management Commands

HP-UX >= 11 default boot disk is under control of LVM - Logical Volume Manager.

 Note

HP-UX shipws with TWO LVM. An native version for core OS partitions, and Veritas

Volume Manager for use with data partitions. Filesystem created by LVM can be hfs(/stand, boot stuff) and vxfs (root, /var, /usr, etc). Further note that in addition to vxfs, HP

talks about JFS and onlineJFS, see fsck.

To some extend, this is akin to Solaris, whereby some admin use the Sun VolumeManager (Disk Suite) for OS disks, and Veritas for data disks. HP-UX just happen to ship

 both pre-installed.LVM devices are /dev/vg00/lvolNVxVm devices are /dev/vx/dsk/rootdg/volNN

LVM cmds are lv... pv... vg...VxVm cmds are vx...

---

LV = logical volume, similar to partition/slide of solaris.

ioscan -fnC disk # scan for all hard drives (+ cd/dvd).

diskinfo

pvcreate -B /dev/rdsk/c3t15d0 # init a raw disk dev as dev for LVM --ie make a PV.pvremove /dev/rdsk/cXtXd0 # reverse/undo of pvcreatepvdisplay /dev/dsk/c1t15d0 # display physical vol info (disk to volgrp info)

# dev path from ioscan output

vgdisplay -v vg00 # display (verbose) vol grp info# vg00 = root vol grp (system files)# /etc/lvmconf list all vol grp in system

lvdisplay -v /dev/vg00/lvol8 # show logical to phy extents map forlogical vol

# a few more commands. some sample eg in LVM mirroring section.

vgextend # vol grp, add disk tovgreduce # vol grp, remove disk fromvgremove # vol grp, remove it completely (all log vol in it will

be gone)

lvcreate # logi vol, create (initial setup)lvextend # logi vol, add space (physical extents) or mirrorconfiglvreduce # logi vol, reduce space or remove mirrorlvchange # logi vol, change allocation policy (congtiguous, etc)lvremove # logi vol, remove it completely (fs will be gone)lvlnboot # make lv bootable.

Page 13: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 13/21

newfs, extendfs etc are applied to LV to make usable filesystem.

Filesystem

mounting cdrom:

mount -o ro -F cdfs /dev/dsk/c2t1d0 /mnt/cdrom

alternate approach (diff format? iona cd):pfs_mountd &pfsd &pfs_mount /dev/rdsk/c2t1d0 /mnt/cdrompfs_umount /mnt/cdrom

Connectivity (Network)

NFS

automount typical auto startup (from ps):/usr/lib/netsvc/fs/automount/automount -f /etc/auto_master -DARCH=SC_HPUX # old automount/usr/lib/netsvc/fs/autofs/automountd -D ARCH=SC_HPUX

# newer autofs, /net may need some OS path in PARISC

/etc/rc.config.d/nfsconf # set both to besure!

AUTO_OPTIONS="-f $AUTO_MASTER -D ARCH=SC_HPUX" #olderautomount

AUTOMOUNTD_OPTIONS="-D ARCH=SC_HPUX" #newer autofssee sambple config in hpux/nfsconf

/sbin/init.d/nfs.client start # automount/autofs, canread the std out from this script

startup file is in /sbin/init.d/nfs.client

Note that if NIS map auto.master use undescore like auto_home,hpux won't be able to translate that to auto.homeAs such, a slew of files need to be added in /etc/auto_home with conentof+auto.home

/etc/auto.products :: +auto.products/etc/auto.automnt :: +auto.automnt

Page 14: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 14/21

Converting NIS server to have map with '.' should work.But afraid break other OS platform, not well tested yet.But Ohio NIS use that and it works fine!Ass hole before created the SNAFU for me.

For compatibility issues, it is probably best to avoid both . and _ inthe filenameThere should not be reason why one can't use auto_master to haveentries like:/products autoproducts # ie, no . or _

Not sure of the effect on auto_home and auto_direct

NFS

/etc/fstab

/dev/vg00/lvol8 /usr vxfs delaylog 0 2netapp:/vol/vol1/users/sa /mnt/sa nfs rw,intr,hard 0 0

/etc/exports

/opt -ro/var -ro

exportfs -a

NIC

lanscan # list all NIC, ifconfig -a doesn't work.-v # verbose, show nic and driver, etc

ifconfig lan0 # almost all NIC are lanXlanadmin -x 0 # tell what is current NIC config, eg duplex

# 0 is NMID from lanscan.lanadmin -X 100FD 0 # force settings, for this session only.

ioscan -fnC lan # id card type and driver.lsdev -C lan # list all devices of Class lan

/etc/rc.config.d/hp*confeg hpbtlanconf = btlan # a-class build-in NIC

hpgsc100conf = btlan4 hsc j3515a # some old box add on nic

hpbasetconf = btlan1hpbase100conf = btlan3 Internal (core) LAN cardhppci100conf = btlan5 "external" pci card A5230Ahpsppci100conf = btlan6 V-class pci lan card# Update this file to# hard coded NIC settings (speed and duplex, eg 100 FD)# remember to add the card interface eg lan0 in the name# section, or it will have no effect!# can also change settings via lanadmin -X 100fd

Page 15: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 15/21

# but it will not live thru reboot.

Determining / setting nic duplex and speedhttp://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=684614

network driver patch for some old (a-class?) machine btlanPHNE_22727 patch for btlan for hpux 11.11, older, stable, safepatchPHNE_23465 latest btlan patch, have some warnings. if work,autoneg will work better.

Network Config

change DNS servers/etc/resolv.conf # same as solaris/aix.sam, networking and communications, DNS (BIND), DNS Resolveruse Menu, Actions, Set Default Domain... to add "search" for other dnsdomains.config file edit is easier, only 1 file.

change ip/netmask:sam, networking and communications, network interface cards# this even allow for speed duplex settings!! Advance has mac addressand mtu./etc/rc.config.d/netconf # IP_ADDRESS[0]="10.10.10.123"SUBNET_MASK[0]

# BROADCAST_ADDRESS[0]="" (blank seems towork, auto calc?)/etc/hosts # enter new IP of machine.

change routing:sam, networking and communications, routes/etc/rc.config.d/netconf # ROUTE_DESTINATION[0]="default"

# ROUTE_MASK[0]=""# ROUTE_GATEWAY[0]="10.10.10.1"# ROUTE_COUNT[0]="1" (aix

consider it as 0)

Adding default router in command line:route add default netmask 255.255.255.0 172.27.188.1 1

 

Serial/console port

Page 16: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 16/21

Printing

To add a network printer, use sam,printers and plotters,LP Spooler,Printers and Plotters,

go to Actions menu, Add Remote Printer

Name of Queue to add --> Use printer name machingwindowsHostname of remote server --> windows print server nameName of queue on remote server --> Windows printer name.Type of print spooler on remote server --> System V (ie, don'tcheck remote is BSD)

Sys Config

Package/Software management

swlist -l productlist all product/patches in system

swlist | grep -e QPK -e GOLDdetermine if any Quality Pack or Gold Base patch has been

installed(service pack equiv).Apperently, all 4 of BUNDLE11i, HWEnable11i, GoldApp and

GoldBase should be installed on the system.Factory OS install included the latest release of all the above

4 patch bundles.swlist -l product | grep PH

look for installed patches. -l product seems to be needed for11i

swinstall -f mysoft -s /mnt/cdsupposed to install software listed in file mysoft from cdrom

swinstall -s /home/sa/share/software-in-cd/hpux_aC++/aC+

+Compiler.800.depotneeded to fully specify the depot file before the damn thing

will recognize the file. It is really just a tar file.

swinstall -s /export/tmp/bash.depot \*install everything in the depot (in this case, sure there is

bash only).

see email about where gnu tools are downloaded

Page 17: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 17/21

[http://hpux.cs.utah.edu, depot format, some ins to/usr/local/bin,

other to /opt, into product specific subdirs!]

Patch

patch install eg:(patch is obtained in a "depot" file format, which is really a tar.Instruction presented in here is also in a text file inside the tar.)

http://www2.itrc.hp.com/service/patch/patchDetail.do?patchid=PHSS_20055&context=hpux:800:11:00

1. Back up your system before installing a patch.

2. Login as root.

3. Copy the patch to the /tmp directory.

4. Move to the /tmp directory and unshar the patch:

cd /tmpsh PHSS_20055

5. Run swinstall to install the patch:

[ to check that depot has been downloaded correctly:swlist -d @ /full/absolute/path/PHSS_20055.depot

]

swinstall -x autoreboot=true -xpatch_match_target=true \

-s /tmp/PHSS_20055.depot

By default swinstall will archive the original software in/var/adm/sw/save/PHSS_20055. If you do not wish to retain acopy of the original software, use the patch_save_files option:

swinstall -x autoreboot=true -xpatch_match_target=true \

-x patch_save_files=false -s/tmp/PHSS_20055.depot

WARNING: If patch_save_files is false when a patch is installed,the patch cannot be deinstalled. Please be carefulwhen using this feature.

For future reference, the contents of the PHSS_20055.text fileis

available in the product readme:

swlist -l product -a readme -d @ /tmp/PHSS_20055.depot

Page 18: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 18/21

To put this patch on a magnetic tape and install from thetape drive, use the command:

dd if=/tmp/PHSS_20055.depot of=/dev/rmt/0m bs=2k

Kernel/System Tuning

sysdef # show many (but not all) kernel parameterskmtune -l # list all kernel parameters, -l for long list(in /usr/sbin)

ulimit -a # display all limits, below are probably defaults.

core file size (blocks, -c) 2097151

data seg size (kbytes, -d) 1048576file size (blocks, -f) unlimitedmax memory size (kbytes, -m) unlimitedopen files (-n) 2048pipe size (512 bytes, -p) 16stack size (kbytes, -s) 8192cpu time (seconds, -t) unlimitedmax user processes (-u) 76virtual memory (kbytes, -v) unlimited

ulimit -s # define stack size.governed by kernel static params and def vals

maxsiz 8388608 (8k)maxsiz_64bit 8388608suggested val for small server 401604608 (max allowed, 383K)

ulimit -n # define max open files, def kernel values:maxfiles 2048 static 4096 # softmaxfiles_lim 2048 dynamic 8192 # hard

maxusers # num of users, base param as multiplier by other params# does not actually govern logins.

npty # pty for user login sessions.

nstrpty # can set them to 1000nstrtel

nproc # max processes that can exist on system, 11i = static# def 20 + 8 * MAXUSERS (5988?)

use sam to define new params and build new kernel.restart is needed.

Page 19: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 19/21

Kernel parameters in default os is not very good for large server, For large java app

servers, get HP tool Java2 Out-of-box and it will plug in all desireble parameters.

Probably good for all server. http://www.hp.com/products1/unix/java/java2/outofbox/ download .depot, swinstal -s /full/path/to/joob_203_1100.depot -xautoreboot=true \*Req reboot.

/usr/sbin/kmtune will display the kernel params. It should modify:maxusers 512nproc 2048max_thread_proc 3000nkthread 6000nfile 3000maxfiles 2048maxfiles_lim 2048ncallout 6000maxdsiz 2063835136tcp_conn_request_max 2048

Adding International Language/Locale support

By default, all the basic support for international language areinstalled. Check with "locale -a".

The CDE language may need to be installed manually:Insert CD2 of HP-UX 11i Foundation Operating Environment, thenrun SAM Software Install and add the CDE bundle of the desired language.

Hardware commands

model - give machine model info

Diagnostic tools

diagnostics tools:

netfmt -(lot of options) /var/adm/nettl.LOGnnn > /tmp/nettl.txtconvert the network problem log from binary to textoptions may have been -l -N -n -f

stm, cstm xstmhardware diagnostic program. text menu, cli and X based.probably not well known, support people use only?

tusksome sort of network troubleshooting util.

Page 20: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 20/21

Random Stuff 

For those from Solaris background:Env variables:SHLIB_PATH is used instead of Solaris

LD_LIBRARY_PATHLD_LIBRARY_PATH for 64 bit version libs. SolarisLD_LIBRARY_PATH64LIB There maybe something about the env var also. Not sure.

dos2unixCouldn't find such command tool, only found charconv.

charconvconvert input file to desired output format-u = unix LF-d = dos CRLF

-m = mac CR-i inputfile, default is std in-o outputfile, default to std out--help more conversion info, including EBCDICeg: cat dostext.txt | charconv -u > unixoutput.txt

Compiler:The bundled cc compiler in /usr/ccs/bin/cc_bundled only takes

K&R function prototype syntax, not Ansi C.Moneyware aCC is Ansi C compliant and installs to /opt/aCC.

HP-UX Freeware

Info about installing hpux gnu freeware from hpux.cs.utah.edu. into NFSserver central location.No real need to use SAM to install the package and xfer to NFS server.Can just do tar trick, see note below. Warning: Some admin may seethis as kludge asit bypass the software management tool. Your choice :)

/import/hpux1100/usr/local$ cat dir.info

This dir is automounted as /import/hpux1100/usr/localVarious link would exist pointing to the parent dir of/import/hpux1100, such as /titaniumlegit.It could also be a symlink from slightly diff version of HP-UX 11.x

These files are gnu freeware depot files for HP-UX 11.00 fromhpux.cs.utah.edu

The source is netapp:/vol/vol1/depot/hpux1100/usr/local

Page 21: Hpux Pocket Survival Guide

8/9/2019 Hpux Pocket Survival Guide

http://slidepdf.com/reader/full/hpux-pocket-survival-guide 21/21

The source depot files are hacked via untar and set of cp commands toput them into the desiredusr/local/bin etc tree structure:

gunzip *.tarmkdir untaredcd untaredfor item in `ls ../*.depot`; do

tar xf $itemdone

mkdir -p cleaned/usrcp -pR */*/usr/* cleaned/usr

and finally the cleanred/usr/local dir is moved here.

---

the opt dir is extracted in similar manner:

mkdir -p cleaned/optcp -pR */*/opt/*/* cleaned/opt/

---

http://hpux.cs.utah.edu/Software Porting and Archive Center for HP-UXFreeware for HP-UX