/opt/etc/samba/smb.conf
HP-UX is a hardware path based operating system. When it boots up it does a hardware detection. It then compares the hardware that it detects with the hardware that is listed in /etc/ioconfig. If new hardware is detected, it is assigned the next available configuration information in the proper hardware path.
rmsf - remove special files
insf - install special files
insf -C disk -e ←- This command will re-install all of the device files for the class “disk”
lsdev ←- Lists devices and drivers in the system
ioscan ←- searches for all devices and displays their hardware path
ioscan -fnC disk ←- searches for all devices of class (C) disk
ioscan -fnH <LUN> ←- searches for a LUN
last 2 digits of hardware path in the LUN in octal (1/12/0/0.1.23)
A disk device will have a name in the following format: c#t#d#
scsictl -a /dev/rdsk/c?t?d? ←- display control parameter information about the disk device
scsictl -a -m queue_depth=4 -m queue_depth /dev/rdsk/c?t?d? ←- sets the queue depth
nohup /usr/sbin/pfs_mountd & - starts process
nohup /usr/sbin/pfds & - starts process
pfs_mount -o xlat=unix /dev/dsk/c0t1d0 /cdrom - mounts cdrom
cvui - creates luns
ioscan -fknC fc ←- Lists fibre channel adapters.
ls -l /dev/fc*
fcmsutil - utility for fibre channel operations
fcmsutil /dev/<device>
ioscan -fnC disk|more –> Identify hw path of fibre channel adapter
ioscan -fnH 1/0/0/0 –> Identify device of fibre channel adapter
or ls /dev/fc* on older adapters (arbitrated loop)
fcmsutil /dev/fcms2 stat –> fcmsutil that shows status of fibre channel adapter
/etc/rc.log | Startup Log |
---|---|
/var/adm/sw/swagent.log | Software package installation log |
/var/adm/syslog/syslog.log | System Error Log |
/etc/shutdownlog | Shutdown Log |
/var/tombstones/ts99 | Crash log |
/etc/profile - main profile for all users
/etc/profile.env
export TMPDIR=/tmpsort
export TEMPDIR=/tmpsort
source a profile: “. ./profile”
export PS1=$(hostname):'$PWD # '
This gives a prompt that has the hostname followed by the current directory, ending in the # (useful for root logins).
netstat -a ←-ports
netstat -i ←-interfaces
netstat -r ←-routing table
netstat -rv ←-routing table and subnet mask
lanscan - provides hardware information about the nics in the server
lanadmin - menu driven interface to administer lan nics
lanadmin -x 0 bypass menu and show lan driver specific options for nic with id 0
lanadmin -X 100FD 0 - bypass menu and set nic at id 0 to 100 MBS, Full Duplex
ioscan -fnkC lan - shows ioscan information for device type “lan”
lanscan -i|awk '{print $1}'|xargs -i ifconfig {} → does an ifconfig on all defined interfaces on that server
ntpq -p –> lists ntp peers and their time sync status
ntpq -p <server fqdn or ip address> –> lists time sync status with that server (slightly different detail than ntpq -p)
/etc/ntp.conf –> configuration file
Changes to the configuration require ntp daemon (xntpd) be stopped and restarted (restart is not recognized):
Command | Description | |
---|---|---|
cancel | deletes print jobs from queue | |
hppi | jet admin | |
ls -d<destination> -o<optioni> file | prints a file | |
lpadmin | ||
lpsched -v | ||
lpstat | lists jobs in queue. -s -t | |
pr .profile | lp -n3 | prints |
pr -o10 -l64 -F -h <HEADER> <file> | lp | prints using margins of 10, page length of 64, header on each page |
/etc/lp
/usr/lib/lp
/var/adm/lp
/var/spool/lp
/etc/lp/interface - interface scripts
/var/sam/lp/lpinfo
top
j moves forward pages in the display
k moves backwared pages in the display
glance (if installed)
sar -q
sar -u
sar -d
vmstat
vminfo
Command | Description | |
---|---|---|
inetd -c | Causes inet to reload /etc/inetd.conf | |
inetd -l | starts logging in /var/adm/syslog/syslog.log | |
ps -ef | grep PROD | list all processes, but only show those processes that have “PROD” in them |
/sbin/init.d/<script> [start | stop] | If the script exists, this will stop and start the associated processes. |
/etc/services –> Lists the services and their configuration
/etc/inetd.conf –> Lists the services and their configuration
/var/adm/inetd.sec –> This file contains security information on who may request a particular process
rcp <source> remote_machine:<path>
remsh <host>
rlogin <host>
.rhosts file needs to be configured or else you will be prompted for username and password (located in home directory)
last -R - gives address information of last remote login, useful for troubleshooting
swinstall –> This will lauch the gui or
swinstall -x <option> -x <option> -s <path to depot> –> This will still lauch the gui, but the parameters will be preselected. This is use to allow selection of additional parameters that may not be selectable from the gui itself (such as the logging levels below)
/var/adm/sw/swagent.log
/var/adm/sw/swinstall.log
swlist -l product | more
Checking for Specific Software
swlist -l product | grep <SEARCH STRING>
Checking for Specific Patches
swlist -l product| grep PH | more
then search for a specific patch (ie PHNE_XXXXX)
Patches can be applied using swinstall, just as depots are installed
swcopy -s /tmp/*.depot -\*@/var/spool/sw
cleanup
cleanup -c n ←- commits patches that have been superseded n number of times. Useful to free up disk space in /var/adm/sw/save.
cleanup -p ←- previews the actual cleanup tasks but does not actually perform the cleanup
check_patches
show_patches
From the directory that has all of the individual depots run this command line script:
for i in PH*.depot
do
swcopy -x enforce_dependencies=false -s ${PWD}/$i \* @ /tmp/patch_depot ←- /tmp/patch_depot is the destination directory
done
Note: See section on STM, detailed system information is available with this utility
Also SAM –>Performance Monitors –> System Properties
uname -a - display general information e.g. OS release, node name, machine ID number, etc
print $(uname -i)16op|dc hex system id
/opt/itor/bin/i4target -v spu
file /stand/vmunix ←- shows whether 64 bit or 32 bit kernel
getconf KERNEL_BITS ←-shows whether 64 bit or 32 bit kernel
dmesg|grep Phy ←- List amount of physical ram in server
cat syslog|grep Phy ←- List amount of physical ram in server
echo phys_mem_pages/D|adb -k /stand/vmunix /dev/kmem ←- Lists amount of 4K Memory pages in HPUX 11.x
echo “memory_installed_in_machine/D” | adb -k /stand/vmunix /dev/mem |tail -1 | awk '$2 > 0 { print $2 / 256 }' ←- Lists memory in MB.
echo “physmem/D” | adb /stand/vmunix /dev/kmem ←- Lists amount of 4K Memory pages in HPUX 10.x
model ←- information about the model of the workstation/server
sam –> Performance Monitors –> System Properties –> Memory Tab
ioscan -fnC processor ←- shows information about each processor found
echo “itick_per_usec/D” | adb -k /stand/vmunix /dev/mem | tail -1 ←- Shows CPU Speed in MHZ
sam –> Performance Monitors –> System Properties –>Processor Tab
echo itick_per_tick/D | adb /stand/vmunix /dev/kmem - gives processor speed
grep model /usr/lib/sched.models - gives type of processor for 10.X systems
grep model /opt/langtools/lib/sched.models - gives processor type for 11.X systems
kmtune - displays the tunable parameters
kmtune -l ←- This displays a detailed report of the parameters (current, planned, default, minimum, etc)
sam allows you to tune the kernel
Manual Kernel Build (not using sam) –> /usr/sbin/mk_kernel -s /stand /build/system
diaglogd
/var/opt/resmon/log
echo “sel path system; info; wait; infolog
view
done
“lcstm>info
#cat info
print_manifest (located in /var/opt/ignite/local/manifest/manifestinfo ??)
cstm
cstm>Map
cstm>SelAll
cstm>Information
cstm>Infolog
cstm>exit
cstm
cstm>SelClass type “Disk” qualifier “All”
cstm>info;wait
cstm>il
cstm>create /tmp/disk.stm
cstm>done
cstm>quit
cstm>ok
cstm -f /tmp/disk.stm
TERM - environmental variable indicating type of terminal
stty
termio
/usr/share/lib/terminfo
setup string for xterm: /usr/bin/X11 -ls -d @D
$DISPLAY=192.168.70.80:0.0
$TERM = xterm
stty
stty -all
Running Exceed –> xstart
start an X-Window server on the PC, such as exceed
export DISPLAY=W.X.Y.Z:0.0 ←–W.X.Y.Z is the IP Address of the PC
/opt/ignite/bin/ignite ←–Now just run the program
sam –> user and group accounts
groupadd Groupname
Command | Description | |
---|---|---|
<esc><esc> or <esc>\ | autocompletion | |
file * | Show file types, such as “ascii”. | |
find <path> -name <name> -print | Finds a file in the OS at the starting path on down | |
grep | ||
groups <username> | Shows groups for a user | |
kmtune | Displays kernel tunable parameters | |
listusers -g <group> | Lists the users in a group | |
ln -s <file or directory> <symbolic link> | Creates a symbolic link to a file or a directory | |
pr -o10 -l64 -F -h <HEADER> <file> | lp | prints using margins of 10, page length of 64, header on each page |
rcp <source> remote_machine:<path> | remote copy | |
remsh <host> | opens a remote command shell on the host machine | |
rlogin <host> | remote login to host machine | |
sar | ||
set_parms | Change host name (/etc/set_parms) | |
tail -f <file> | Looks at end of file and keeps it open to watch changes | |
top | realtime display of processes | |
uname -a | information about the system | |
print $(uname -i)16op | dc | prints hex system id |
who -u, who -Rm | who is using the system |