Reset GSP
#stty +resetGSP < /dev/GSPdiag1 --> (for reseting the GSP) #stty +queryGSP < /dev/GSPdiag1 ----> (For checking GSP)
Tape drive status.
# mt -f /dev/rmt/0mn status Drive: QUANTUM SuperDLT1 Format: Status: [0] File: 0 Block: 0 When there is no tape loaded in the drive or at least it thinks there is no tape in the drive so until you get the Status line to display more than simply “[0]”
wtmp
The utmp file can be manipulated with the fwtmp command. 1.check the last modification time of the /etc/utmp file ls -l /etc/utmp -rw-r–r– 1 root root 1620 Jun 28 09:22 /etc/utmp 2.convert the binary /etc/utmp file to ascii : /usr/sbin/acct/fwtmp /tmp/utmp.ascii 3.edit the /tmp/utmp.ascii file to remove the old entries Note : the entries are […]
operators
‘-eq’ and ‘=’. They are slightly different: ‘-eq’ is a integer comparison but ‘=’ is a string comparison. Examples: [[ 0 -eq 0000 ]]; echo $? # shows 0 (true) [[ 0 = 0000 ]]; echo $? # shows 1 (false) don’t forget to surround each $var1 with double quotes to prevent null chars. if […]
Fiber Status
fcmsutil /dev/fcd01 stat | more
banner
HOST=”<`hostname |cut -d”.” -f1`>” if [ “$LOGNAME” = “root” ]; then PROMT=”#” else PROMT=”>” fi PS1=’${HOST} ${PWD}${PROMT} ‘ PS2=’${HOST} ${PWD}> ‘ export PS1 PS2 trap 1 2 3 inetd.conf telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/issue PROBLEM This document describes how to set up a message for when users telnet into the system. […]
Apache 1.3.x Web Server Performance Tuning
Apache 1.3.x Web Server Performance Tuning on HP-UX 11.x (Rev C, 10/23/01) Kernel Parameters Parameter Default Value Recommended Value maxusers 32 128 nproc 20+8*MAXUSERS 20+128*MAXUSERS maxuprc 75 8192 nkthread ((NPROC*7)/4)+16 8192 max_thread_proc 64 1024 maxdsiz 0x04000000 0x10000000 maxfiles 60 2048 maxfiles_lim 1024 2048 nflocks 200 16384 semmns 128 512 semmni 64 256 ninode ((NPROC+16+MAXUSERS)+32+(2*NPTY)) 2((NPROC+16+MAXUSERS)+32+(2*NPTY)) […]
lbolt
PROBLEM I am running HP-UX 11.0 on an N4000 server. The syslog.log file contains the following error line: vmunix: SCSI: Request Timeout — lbolt: 1406090869, dev: 1f026000 How do I determine which device generates the lbolt/timeout errors? CONFIGURATION Operating System – HP-UX Version – 11.0 Hardware System – HP9000 Series – N4000 Subsystem – System […]
Kill Pid
#!/bin/ksh ## List all running processes and grep for the “program_name” ## make sure to ignore the grep process that is running (grep -v grep) ## The process id is the second column in the ps -ef statement pid_var=`ps -ef | grep program_name | grep -v grep | awk ‘{print $2}’` kill -9 $pid_var ## […]
ftp access
Use this procedure to configure the new ftpd: Note: A user will not have the ability to travel anywhere outside of his home directory on the system. Setting up a bogus shell with exit 0 as the contents will cause the connection of a user to be immediately terminated if the user attempts to telnet […]