Here is the list of the some important commands for the HP-Ux Server System.
Bootup/Shutdown
Shutdown = shutdown -r 0
Shutdown and Halt = shutdown -h now
Shutdown to single user mode = shutdown 0
Reboot = reboot 0
Single user mode = init 1 -
Boots single user mode = hpux -is
Interupting the boot process:
• Configuration Menu
• Information Menu
• Service Menu
GSP Mode
• From the console hit
• Hit
• Now low level commands can be entered
o ps --> power status
2. hit
3. enter:
4. interact with ipl? yes
5. hpux -is (i=init, s=single user)
2.
3. bo
4. interact with ipl --> yes
5. hpux -is (i=init, s=single user mode)
6. mount -a
7. init 3
/sbin/rc0.d These are all linked to actual scripts in /sbin/init.d
/sbin/rc1.d
/sbin/rc2.d scripts with k are kill scripts and scripts with s are start scritps.
/sbin/rc3.d
/sbin/rc4.d
CIFS (Samba)
/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.
insf - install special files
insf -C disk -e <-- This command will re-install all of the device files for the class "disk"
t# is the target number
d# is the LUN - this is normally 0 unless RAID is being utilized
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 CD-ROM Devices
nohup /usr/sbin/pfs_mountd & - starts process nohup /usr/sbin/pfds & - starts process pfs_mount -o xlat=unix /dev/dsk/c0t1d0 /cdrom - mounts cdrom
Cdrom won't eject:
1. pfs_umount -c OR 2. kill -9 pfs_mountd and kill -9 mountd Cdrom won't mount using: pfs_mount -o xlat=unix /dev/dsk/c0t1d0 /cdrom
1. nohup /usr/sbin/pfs_mountd & 2. nohup /usr/sbin/pfsd
3. /usr/sbin/pfs_mount /cdrom <-- this uses mounting information in /etc/pfs_fstab 7400 Disk Array
armdsp -a va7400 <-- real time display of the disk array
armmgr -D va7400 HPA6189A00SG218H0024 armdiscover /opt/sanmgr/commandview/client/sbin --> Tells us the serial number
armhost -d
armhost -d 50060b000014e313 00SG218J0024
ioscan -fnc disk | more
Find last LUN
Process to export disk configuration to a file:
• sam --> actions-->export
• volume group name --> mapfile name
Fibre Channel Devices
ioscan -fknC fc <-- Lists fibre channel adapters.
To identify the devices: ls -l /dev/fc* fcmsutil - utility for fibre channel operations fcmsutil /dev/
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
Logs
/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.env
export TMPDIR=/tmpsort
export TEMPDIR=/tmpsort
source a profile: ". ./profile"
This gives a prompt that has the hostname followed by the current directory, ending in the # (useful for root logins).
Networking
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
• cd rc.config.d
• vi netconf
ntpq -p
/etc/ntp.conf = configuration file
Changes to the configuration require ntp daemon (xntpd) be stopped and restarted (restart is not recognized):
• /sbin/init.d/xntpd stop
• /sbin/init.d/xntpd start
cancel deletes print jobs from queue
hppi jet admin
ls -d
lpadmin
lpsched -v
lpstat lists jobs in queue. -s -t
pr .profile | lp -n3 prints
pr -o10 -l64 -F -h
/etc/lp
/usr/lib/lp
/var/adm/lp
/var/spool/lp
/etc/lp/interface - interface scripts
/var/sam/lp/lpinfo
On the source server:
Spooler Configuration
This saves the information in the directory /var/sam/lp
SAM --> Printers & Plotters --> LP Spooler --> Save/Restor Spooler Configuration
j moves forward pages in the display
k moves backwared pages in the display
glance (if installed)
sar -q
sar -u
sar -d
vminfo
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/
No comments:
Post a Comment