0% found this document useful (0 votes)
177 views7 pages

HP-UX Cheatsheet: by Siberianbunny

Uploaded by

srikanth_n1986
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views7 pages

HP-UX Cheatsheet: by Siberianbunny

Uploaded by

srikanth_n1986
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

HP-UX 

cheatsheet
By siberianbunny
I recently had to administer some HPUX boxes. Not having had much experience
with HPUX before
I made myself a quick cheat-sheet, kinda like HPUX for Solaris/Linux admins.
It isn't complete,
and if you see any mistakes/glaring omissions please point them out.

Startup/shut down
Startup
Boot device: PRImary, HA ALTernative (mirror boot disk), ALTernative (tape,
cd, network)
PDC (firmware) -> reads LIF volume (boot block) -> and loads ISL (Grub) ->
load kernel (/stand/vmunix)
PDC has variables autoboot and autosearch
setboot == eeprom
shutdown
to reboot user has to be mentioned in /etc/shutdown.allow
# /sbin/reboot [-h -r]
# shutdown -h -g0 -y
or
# shutdown -r -g0 -y
removefru == OLA/R ???
Services - start/stop
/etc/init.d
Patching
http://europe-support.external.hp.com   europe patch website
Insert/mount CD -> read README
To remove: swremove
Package management
HPUX addresses software as bundles/products/filesets which are stored in
"depot" (repo) on a system
# swinstall
# swremove
# swlist  - whats currently installed in the system
# swlist -l <package name>  list files in a package
Kernel
# kmadmin = lsmod + modprobe
Printers
Network setup
normal
# lanscan
shows available interfaces
# ifconfig [interface id] - from above command
# cat /etc/rc.config.d/netconf - all configured interfaces, ip, etc
# landiag (hard link to lanadmin) - all purpose lan admin program
to set IP: # /sbin/set_params initial  ????
# nettl == snoop
# netfmt - format log files generated by nettl
ipmp
Not free use either Serviceguard or Auto Port Aggregation
SWAP
# swapinfo [-m]
crash dumps
# crashconf
# alwaysdump/dontdump/dump_compress_on/dump_concurrent_on
crash files go: /var/adm/crash
Backup/restore
# fbackup -f /dev/rmt/1h -0 -g /var/adm/fbackupfiles/graphs/g1
"graph" file can be used to specify what to include/exclude:
# cat /var/adm/fbackupfiles/graphs/g1
i /home
e /home/bunnny_bs
# frecover -x -oF -i /home/text
in above F removes trailing slash
OR
# frecover -r -vf remote-system:/dev/rmt/0m
NFS/AutoFS
NFS
# cat /etc/dfs/sharetab - edit by hand
# /etc/init.d/nfs.server start
# shareall -F nfs
LVM
disk replacement
in morror
1. check what logical volumes are on this disk
# pvdisplay -v /dev/dsk/cntndn
For each volume above can check that all extents are mirrored
# lvdisplay /dev/vol_group/lvoln |grep /dev/dsk/cntndn
2. Backup volume group config
# vgcfgbackup /dev/vol_group
3. Disable any lv timeouts (where not set to 0)
# lvchange -t 0 /dev/vol_group/lvoln
4. Disable all patch to the disk
# pvchange -a N /dev/dsk/cntndn
5. Physically change disk
6. If boot disk setup boot area
(on Integrity servers use 'idisk')
# mkboot /dev/dsk/cntndn
On Integrity Servers, use the -e and -l options to the mkboot command to copy
EFI utilities to the EFI partition
# mkboot -e -l /dev/rdsk/cntndn
Update the root volume group information:
# lvlnboot -R /dev/vg00
7. Restore LVM config to new disk
# vgcfgrestore -n /dev/vol_group /dev/rdsk/cntnd
8. Reattach the links to physical disk (once re-attached resync will begin
automatically)
using pvchange
# pvchange -a y /dev/dsk/cntndn
OR using vgchange
# vgchange -a y /dev/vol_group
9. Restore non-default timeouts
# lvchange -t value /dev/vol_group/lvoln
multipathing
# /sbin/extendfs /dev/vg00/rvol7
Disks
# diskinfo + pvdisplay = prtvtoc
# ioscan -fn    ( Check for no_hw )
# vgdisplay -v ( Check for unavailable or stale )
Looks in /var/adm/syslog/syslog.log
Fiber channel
# ioscan -funCfc|more   - list FC ports and HBAs
Class     I  H/W Path  Driver S/W State   H/W Type     Description
=================================================================
fc        4  0/1/1/0   fcd  CLAIMED     INTERFACE    HP AB379-60101 4Gb Dual
Port PCI/PCI-X Fibre Channel Adapter (FC Port 1)

/dev/fcd4
fc        5  0/1/1/1   fcd  CLAIMED     INTERFACE    HP AB379-60101 4Gb Dual
Port PCI/PCI-X Fibre Channel Adapter (FC Port 2)

/dev/fcd5

# fcmsutil - queries status of HBA eg fcmsutil /dev/fcd0

Password matters
Password can not be changed. Reason: Password lifetime has passed
# /usr/lbin/modprpw -l -k sarkars2
# passwd sarkars2
Trusted HPUX
/tsb/files/auth/[alphabet letter of username]

Forgotten password (root or other)


log in as root
# cd /tcb/files/auth/r
# vi root
On the second line remove the encrypted password
:u_pwd=:\
:wq!
# passwd root ( there will be no root password between writing the file and
issuing this command )

Security
RBAC??
/etc/nsswitch.conf/NCSD
nPAR/vPar
Ignite???
Hardware info gathering
# mode - server model
# machinfo      - print CPU + model + memory, etc (itanic only)
# print_manifest [-s]   - print all system hardware/perifirals (ALWAYS use -s
otherwise rescans the entire device tree)
# cat /var/opt/ignite/local/manifest/manifest.info for same info
# dmesg |grep Physical - memory
# ndd -get    nic stats
# lanscan      list all NICs
# diskinfo
# fcms??????

Troubleshooting
# stm/cstm/mstm/xstm like prtdiag can show failing HW ????
# lanscan for network
# getsysinfo == explorer??????
Adding HW:
# ioscan -fnC devtype
# insf -C devtype       (NEVER run -e option on systems with ASM and possibly
VxVM)
FTP
To create an ftp account that can't cd out of home (basically chroot'd)
edit the home dir in the /etc/passwd to look like this:
ftpcon:*:172:203:BGF10012,,,:/bip_netview/landing/./ftpcon:/usr/bin/false
and set the shell to /bin/false
then make sure the account is member of the group
ftponly
and set permissions/ownership on the home directory like so:
host02 # ls -ld /bip_netview
dr-xr-xr-x   3 root       sys             96 Dec 11  2008 /bip_netview
host02 # ls -ld /bip_netview/landing
dr-xr-xr-x   3 root       sys             96 Aug 13 16:40
/bip_netview/landing
host02 # ls -ld /bip_netview/landing/BTWSLG
drwxr-xr-x   2 ftprecon   ftponly         96 Aug 13 16:40
/bip_netview/landing/ftpcon

ALOM settings
To start a console session from ILOM:
start /SP/console
To stop another console session
stop /SP/console

To send a BREAK
set /HOST send_break_action=break

To power off system gracefully (ie clean shutdown)


stop /SYS

To power off system immediately


stop /SYS -force

To power on system
start /SYS

ILO on HP hosts looks like this:

MP password: Admin
MP login: Admin
MP password: Admin

Welcome to the

rp8400 Management Processor

(c) Copyright 1995-2002 Hewlett-Packard Co., All Rights Reserved.

Version 3.05

MP MAIN MENU:

CO: Consoles
VFP: Virtual Front Panel (partition status)
CM: Command Menu
CL: Console Logs
SL: Show chassis Logs
HE: Help
X: Exit Connection
MP> CO

Partitions available:

Part#  Name
-----  ----
0)  Partition 0
Q)  Quit

Please select partition number: 0

Connecting to Console: Partition 0

(Use ^B to return to main menu.)

[A few lines of context from the console log:]

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy