UX Admin Guide
UX Admin Guide
LOG FILES
/etc/rc.log – rc script output from current boot.
/etc/rc.log.old - rc script output from previous boot
/var/adm/syslog/syslog.log - syslogd facility messages of
info or higher from current boot.
/var/adm/syslog/OLDsyslog.log – syslogd facility messages
of info or higher from previous boot.
/var/adm/syslog/mail.log – syslogd mail facility messages
/logdat/maste* - ??? (Need more information)
/var/mail/root - Root’s mail. Sometimes errors are
reported here.
# > /var/adm/wtmp
Command Information
Prints a formatted ASCII system
# /opt/ignite/bin/print_manifest |
manifest. (See man
more
print_manifest)
Displays the machines
# uname -i
identification number.
Displays the amount of physical
# mem
memory.
# cstm
cstm> map
cstm> sel dev (memnumber) Using CSTM you can query the
cstm> info Memory sizes and count.
cstm> infolog
cstm> q
Display and update information
# top about the top processes on the
system
On N, L, A class machines this
# model will display the processor
speed.
On all other systems use this
# itick_per_tick/D | adb -k
string of commands to display
/stand/vmunix /dev/kmem | tail -1 |
the processor speed. I would
awk '{print $2/10000}'
suggest copying the command to a
shell script and running it.
This will display the tape
devices that the system
# /usr/sbin/ioscan –fnC tape
recognizes. (DDS-2 is C1533A and
DDS-3 is C1537A)
# /usr/sbin/ioscan –fnC lan Type of Network Card and Driver
Type/ Number of Disk devices the
# /usr/sbin/ioscan –fnC disk
system sees
# find / -exec grep “string” {} Find a string of text anywhere
/dev/null \; on a system
Displays the number of bits the
# getconf KERNEL_BITS
kernel is, ie, 32 or 64.
sed ‘s/string/newstring/’filename > replace a line of text within a
tempfilename file
See if a patch is in the kernel:
what /stand/vmunix | grep -i btlan
(ex. Looking for “btlan”)
See all patches install on
/usr/contrib/bin/show_patches –a
system
ipcs –mb See processes using shmem
# vxupgrade /home See what version of JFS a
filesystem is. (to upgrade to
v4, use “–n 4”)
View Swap information including
# swapinfo –tam
what is locked and vg’s
# kmtune | more
or View current kernel settings
# kmtune –q parameter
Check Buffer Cache Size.
# sysdef |grep bufpages
(Multiply by 4096 to get mb)
QUERYING A SYSTEM FOR INFORMATION
# fuser –cu
View files opened by a user in a directory
/directory
# fuser –k Kill processes opened by a file system
Get a process number count accessing a given file
# fuser –cu | wc –w
system
# fstyp –v See Default Blksize for a filesystem. Note:
/dev/vgXX/rlovlX Defaults are HFS = 8k, VXFS = 8k
List open (currently accessed) files. (this
# /usr/bin/lsof
feature is not standard, download from the HP
/directory
Porting and archive center, search for lsof.)
# file –c filename See if a file with a count of 0 is really empty
2. Prompt
a. Put the following Lines in the appropriate
~/.profile, or the /etc/profile:
export HISTFILE=$HOME/.sh_history
export HISTSIZE=500
export EDITOR=vi
# /opt/perf/bin/glance
# /opt/perf/bin/gpm &
# /usr/sbin/vmstat
# mkdir /var/adm/sa
Related files:
/usr/lbin/sa/sa1 - Command text file that is called to
define and build the logs.
/usr/lbin/sa/sa2 - Command text file that is called to
clean up files older than 7 days. (This is configurable
by changing the +7.)
/usr/lbin/sa/sadc – executable that collects information
from the system for SAR.
If you just want to run at the command line for current
information, use the following command:
/usr/sbin/sar 1 5
(this show 5 checkpoints, 1 second apart each)
SYSTEM UTILITIES
STARTUP
Beginning with HPUX 10 /etc/inittab calls /sbin/rc, which in
turn calls execution scripts to start subsystems. This
approach follows the OSF/1 industry standard and has been
adopted by Sun, SGI, and other vendors. There are four
components to this method of startup and shutdown: /sbin/rc,
execution scripts, configuration variable scripts, and link
files.
/sbin/rc
Execution scripts
ROUTE_DESTINATION[0]="default"
ROUTE_GATEWAY[0]="gateway_address"
ROUTE_COUNT[0]="1"
GENERAL NETWORKING
#lanscan
2. To see what your CRD IN# is for the card in question.
9. #ioscan –fnC lan - Let’s you see what kind of card(s) you
have. All cards except “Built-in LAN” are 100mb capable.
Cards that start with “BTLAN..” are 100 mb capable cards.
This is the most common.
#/sbin/init.d/inetd stop
#/sbin/init.d/net stop
#/sbin/init.d/net start
#/sbin/init.d/inetd start
DISABLE DHCP
SET UP DNS
Example:
domain viatel.com
nameserver 10.192.4.20 #cslvtele
IMPORTANT FILES
DRIVER INFORMATION
ROUTE_GATEWAY[1]=172.16.2.1
ROUTE_COUNT[1=1
ROUTE_DESTINATION=”net 172.16.2.x”
#bdf
#umount /usr
If you run into problems you may have to boot into single
user mode, or you may need to kill all processes associated
with /usr.
#fuser –k /usr
#/sbin/extendfs /dev/vg00/rlvol6
#init 3
#pvcreate /dev/rdsk/???
#bdf
#pvcreate /dev/rdsk/???
1. Physically add the hard drive and bring the server back
up.
Use the command ioscan –fnC disk and find the associated
device file name for the drive.
#pvcreate /dev/rdsk/cXtXdX
#mkdir /dev/vg02
#mknod /dev/vg02/ group c 64 0x020000
*When doing mknod, the 2 numbers are the major and minor.
The major number is always 64 in this case. The minor number
relates to the decimal to hexadecimal conversion of the
volume group number. This is more of a guideline than a
rule.
5. Now that you have created the volume group you can create
the first lvol:
10. You will go back to the drop down menu, you can add
LVOL’s now, or tab to “OK”
2. Verify it is active:
#swapinfo –tam
MANAGING “LARGEFILES”
“Largefiles” are 2048mb or larger. By default, an HPUX
install does not support this. You need to check the status
of the filesystem in question, then issue some commands and
edit the fstab file to enable.
#/usr/sbin/fstyp –v /dev/vgXX/lvolX
(You can
#/usr/sbin/fsadm –F vxfs –o largefiles /dev/vgXX/lvolX
specify the mount point if you are using Online JFS)
#pvcreate –B /dev/rdsk/c0t1d0
#mkboot /dev/rdsk/c0t1d0
MIRRORING
Definitions
RAID Levels
RAID 0 - Speed
RAID 2 - Speed
#lvlnboot –v
#lvsplit /dev/vg00/lvol1
Mount the new lvol to what ever you want, and back it up.
After you are finished, you must remirror and sync with
existing and new data created on The active mirror. Use
this command (using the lvol1b from example above):
#lvlnboot –v
#vi /etc/mail/aliases
#Local aliases
usergroup :[email protected]
othergroup :localuseraccount
2. Important files
#what /usr/sbin/sendmail
1. Important files:
- Daemon file.Enables/Disables XNTPD
/etc/rc.config.d/netdaemons
from running.
/etc/ntp.conf - NTP configuration file. Should contain the
NTP Server IP Address, driftfile path(/etc/ntpdrift), and
controlkey.
/etc/ntp.keys - file contains “key”code, or specific number
that is required to authenticate the NTP server .
/etc/ntp.drift - File controling the amount time allowed to
drift from the control server before it is corrected.
#TZ=UTC0;export TZ
#ntpdate –d 192.50.54.129 (compare current time to central time
server)
#ntpdate 192.50.54.129
#/usr/sbin/xntpd start
PRINTING
2. Management
A. #lpstat - Shows the status of all requests still in
the output queue.
3. Import Files/Directories
/var/adm/lp/log – LP activity and error log.
/opt/hpnp/tmp/printername.log or /opt/hpnpl/tmp/printername.log
– Printer log.
4. Printer Problems
A. There was no "Stopping" scheduler message, it looks
like the scheduler was messed up inadvertently. To fix
this, you need to delete the following 2 files,
/var/spool/lp/FIFO and /var/spool/lp/SCHEDLOCK. lpsched
should then start up fine.
BANNER=”yes”
BANNER=””
banner:0
cd /var/spool/lp/interface/model.orig
vi <printer file> # this will be the name of the
printer
edit the line that says paper=”def” to say
paper=”ISOA4”
XTERM
1. To export a display. On the server you are sending
from, enter the following command:
1. Commands
or
#/usr/contrib/bin/show_patches -a
2. Installing a patch.
a. Shar the patch:
#swinstall -s /tmp/package.depot \*
#swinstall -s /tmp/depot \*
4. To see what PATCH LEVEL you are at, look at the largest
number directory in the /tmp/PHTXT directory. An Additional
way is to look for the 2 files below when you do a
#swconfig \*
#swconfig SysAdmin*
FTP
1. For FTP to work, several conditions must be met:
Example:
Example:
2. Exception files:
SYSTEM FAILURES
1. Crashes & Panics Usually described as such in
/etc/shutdownlog
# cd /var/adm/crash
B. Find the latest crash, and cd into it.
# cd crash.1
#. /usr/contrib/Q4/bin/set_env
q4 –p . << END
lpmc_count
load diag_lpmc_log_type from lpmc_log max 2*runningprocs
print -x indexof%d hversion hpa pim_size pim_ptr
END
#file core
#cd /var/tombstones
#cat ts99
FBACKUP/FRECOVER
1. Common fbackup commands: (/filedir means ex. could be a
file or whole directory)
Useful Options:
-X Extract to pwd
–F No leading directories, useful when using “-X”
–v Shows “verbose” output
–g /graphfile Uses a graph file with each file to
restore listed on each line.
# /opt/ignite/bin/make_recovery –A
www.software.hp.com/products/IUX/download.html
# mt –f /dev/rmt/0mn fsf 1
B. Recover file:
# pax –v –f /dev/rmt/0m
KERNEL
1. Change the Kernel and Build it by command line:
# cd /stand/build
# /usr/lbin/sysadm/system_prep –v –s system
# /usr/sbin/mk_kernel –s system
# mv /stand/system /stand/system.good
# mv /stand/vmunix /stand/vmunix.good
B. Verify change (
#kmtune –q shmmax
GSP
1. Commonly used commands
#insf –e
#/opt/sanmgr/commandview/client/sbin/armdiscover
#/opt/sanmgr/commandview/client/sbin/armdiscover –v
2. Daemons
# cd /var/opt/hparray/log
# rm L00000*
# rm AMMCATLG
# rm LOGCATLG
# touch AMMCATLG
# chmod 444 AMMCATLG
# chown root:root AMMCATLG
1. Important Files
2. Commands
A./usr/bin/crontab –l - List the entries in the current
users crontab
3. File Entries
A. The entries in the crontab must be listed in the
following order:
#/usr/sbin/pfs_mountd &
#/usr/sbin/pfsd &
#/usr/sbin/pfs_mount /dev/dsk/c3t2d0 /SD_CDROM (assuming SD_CDROM
exists
#su oracle
#exit
#/usr/sbin/pfs_umount /SD_CDROM
#mc -p /dev/dltpt -s S4 -d D1
Dismount tape in drive and move back to slot 4:
# mc –p /dev/dlpt –s D1 –d S4
# /usr/sam/lbin/lpmgr -S -xsavedir=/var/tmp/printers.copy
# /usr/sam/lbin/lpmgr -R -xsavedir=/var/tmp/printers.copy
UNSORTED Notes
1. If you want to edit the /etc/passwd file, use
/usr/sbin/vipw (it checks for errors)
2. If you want to create a user by command line, use the
following:
After you have created the user you will have to set the
password manually. If you want to force the user to change
the password you just set, after the first login, put a
comma and 2 dots after the data in the password field of the
/etc/passwd file. (ie: username:encryptedpw,..:)
#insf –e
#strings /etc/lvmtab
ACRONYMS
IFS = Internal Field Seperator
SAM = System Administration Manager
ISL = Initial System Loader
IPL = Initial Program Loader
LVM = Logical Volume Manager
LP = Line Printer
TZ = Time Zone
I/O = Input / Output
TCP/IP = as
NFS = Network File System
ACL = Access Control List
HP VUE = Hewlett Packard Visual User Environment
CDE = Common Desktop Environment
CRT = Cathode Ray Tube
RAID = Redundant Arrays of Independent Disks
STM = Support Toll Manager