6.21.2012

memory details on HPUX

echo "selclass qualifier memory;info;wait;infolog" | /usr/sbin/cstm > /tmp/cstmramlog.txt


For i2 blades run:  /opt/propplus/bin/cprop -summary -c "Memory"

6.14.2012

ssh errors

sshd[20015]: Accepted publickey for USER from IP  port 3891 ssh2
sshd[20032]: wtmp_get_entry: problem opening /var/adm/wtmp: Permission denied
sshd[20015]: error: openpty: Device busy
sshd[20032]: error: session_pty_req: session 0 alloc failed
if you get this, then something is holding some device files open.  Close all ssh sessions and do a ps -ef | grep ssh.  kill any sessions you find, then restart ssh:  /sbin/init.d/secsh stop / start

newer versions probably do not have this problem - this was on 11.11 using T1471AA                               A.03.81.002    HP-UX Secure Shell

6.13.2012

ECC agent install issues on HPUX

if you have file systems listed in fstab that won't mount, dont think you can get away by doing an -x mount_all_filesystems=false.  You'll probably need to comment them out of fstab.  ECC is sometimes bundled and kicks off a secondary swinstall that doesn't get any options passed to it.
 
also if you get the following message in swagent.log:

An unsupported version of Master Agent was found.  Please uninstall from /usr/ecc to continue.
./install_native.sh[372]: /usr/ecc/install_native.log: Cannot create the specified file.
 
but yet, there is no /usr/ecc.....    it's finding a file in /var/emc/.eccrc and thinks there's a previous version installed - just delete that file and try again.

OnlineJFS not installed on HPUX 11.31 (or newer versions)

fsadm command to extend a file system online wasn't working – got this error:

UX:vxfs fsadm: ERROR: V-3-25255: fsadm: You don't have a license to run this program

I then checked and did not see the OnlineJFS product, so I did the following steps to fix it and was able to then extend the file system:

swinstall -x autoreboot=true -x mount_all_filesystems=false -s DEPOTSERVER:/depot/11.31 B3929EA

Then see if the license is installed:
/usr/sbin/vxlicrep
 
enable license:
/sbin/vxenablef –a

then you should b able to extend.

 

6.07.2012

hpux 11.23 panic lo_realvfs

Panic string: lo_realvfs
 
if you have automountd or autofs turned on and an application or someone tries to access the local machine via /net/HOSTNAME, autofs creates a LOFS mount it since it's a local file sytem.  This rarely cuases problems but there is a known issue with the LOFS code that causes a panic, with Panic string: lo_realvfs in the /etc/shutdownlog
 
The work-around is to add the -L option to AUTOMOUNTD_OPTIONS in the nfsconf file:
check the options first:
ch_rc -vlp AUTOMOUNTD_OPTIONS
 
add the -L option:
ch_rc -ap AUTOMOUNTD_OPTIONS=-L
 
reboot the box or restart NFS:   (you may only have to restart nfs.client, but I have not tested that)
/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.server stop
/sbin/init.d/nfs.core stop
 
/sbin/init.d/nfs.core start
/sbin/init.d/nfs.server start
/sbin/init.d/nfs.client start

6.04.2012

ADS - alternate data streams on NTFS and batch files

run a batch file (.bat or .cmd) from a network share or downloaded to your local drive without the security dialog
filename:Zone.Identifier

ADS

sending vcards to LG420G (straighttalk)

Had a bugger of a time transferring vcard phone contacts from lg220c to lg420g.  it appears that the format used by lg420g (straight talk) expects


vcf format for LG220C to LG420G:
the email records of each contact needs at two fields: EMAIL and HOMEor (whatever) 

sed -e '/^EMAIL/d' ContactA.vcf > ../ContactA.vcf

disabling browser back button in windows

disable the browser back button

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,6a,e0,00,00,69,e0,\
  00,00,00,00


This will also (inadvertently) prevent Windows Update KB2686509 from installing with the following message:
Some updates could not be installed.
Security Update for Windows XP (KB268509)


to install the patch, delete the Scancode Map, reboot (Necessary) and re-install the patch or run Windows Update.

2.16.2012

HP SmartArray controller disk replacement steps on HP i2 blades

This is for the BL860c i2 blades (and other i2 models):


Replace a failed LVM mirror disk that is attached to a SmartArray SAS controller.

 

Notes:  For this example /dev/disk/disk2 is the failed disk and /dev/disk/disk4 is the new device that was created because the SAS controller identified a new disk.

Notes:  For this example the SAS controller device is /dev/ciss0

Notes:  The failed disk is in volume group vg00

 

Identify the disk by serial number.  Give the Bay number to the HP CE so they know which disk to replace:

sautil /dev/ciss0 -s

scsimgr get_info -D /dev/rdisk/disk2

 

Deactivate the PV:

pvchange -a n /dev/disk/disk2

 

Replace the failed disk.

 

Activate the WWID of the new disk.  The Error can be ignored.  A new disk device should be created:

scsimgr -f replace_wwid -D /dev/rdisk/disk2 dsf

scsimgr: ERROR: Cannot convert hardware path to an IO tree node

 

Find the new disk device that was created:

ioscan -fNnC disk

 

Create a description file to create the EFI partitions:

# cat >> /tmp/idf << EOF

3

EFI 500MB

HPUX 100%

HPSP 400MB

 

Use idisk to setup the disk partitioning on the new disk device:

idisk -wf /tmp/idf  /dev/rdisk/disk4

insf -e –C disk

 

Assign the old instance number to the replacement disk:

io_redirect_dsf -d /dev/disk/disk2 -n /dev/disk/disk4

 

Verify that /dev/disk/disk2 is in a claimed state:

ioscan –fnNC disk

 

Use mkboot to format and populate the newly created EFI partition:

mkboot -e -l /dev/disk/disk2

 

Change the AUTO file contents to the proper mode:

mkboot -a "boot vmunix -lq" /dev/rdisk/disk2

 

Restore the LVM reserved areas (PVRA/VGRA):

vgcfgrestore –n vg00 /dev/rdisk/disk2_p2

 

Reattach the new disk:

pvchange -a y /dev/disk/disk2_p2

 

Sync volume group:

vgsync vg00

 

Use lvlnboot to ensure that the LVM logical volumes are prepared:

lvlnboot -R

lvlnboot -v

SAS controller on HPUX itanium disk replace

The SAS controller in the first generation BL860C (and other models) has some special commands in order to replace a failed disk.  I would recommend using the built-in RAID-1 capabilities of this controller - that way you no longer need to worry about LVM mirroring.  But if you need to use LVM mirroring then, add the couple steps below to your standard LVM mirror root/boot disk procedure:

#get the SAS controller dsf:
saslist get_info ctrl sasd

#get info on the disks:
sasmgr get_info -D /dev/sasd0 -q raid

#if the disk is working enough to turn on the attention LED:
sasmgr set_attr -D /dev/sasd0 -q lun=/dev/dsk/c0t1d0 -q locate_led=on

AFTER the disk is replaced:
#since each disk will have a unique WWID, the server will assign a new HW path and persistent dsf
#to change them first change the hardware path (legacy style)
sasmgr replace_tgt -D /dev/sasd0 -q old_tgt_hwpath=0/2/1/0.0.0.1.0 -q new_tgt_hwpath=0/2/1/0.0.0.2.0

#then change the persistent dsf
io_redirect_dsf -d /dev/disk/disk3 -n /dev/disk/disk8

1.26.2012

sas commands (Hardware mirroring) hp-ux

HPUX SAS controller commands - hardware mirroring (only on some controllers)

status of serial attached SCSI raid set:
sasmgr get_info -D /dev/sasd0 -q raid

get controller HW path and device file
saslist get_info ctrl sasd

get list of LUNs being controlled by the sasd driver
saslist get_info lun sasd

status all physical drives
sasmgr get_info -D /dev/sasd0 -q phy=all

statistics of HBA (for problems)
sasmgr get_stat -D /dev/sasd0

track down disk problems
sasmgr get_stat -D /dev/sasd0 -q phy=all

clear statistics on PHY 1
sasmgr clear_stat -D /dev/sasd0 -q phy_in_port=1

1.12.2012

start a search when opening a file in vi

To start a search when opening a file: vi +/Search_string /tmp/filename
It'll open a vi session placing your cursor at the start of the line containing the first match of the keyword.   You can hit 'n' to continue the search like normal

1.09.2012

cimprovagt using too much memory

if cimprovagt is using too much memory, you can restart it by restarting the whole cimserver ( /sbin/init.d/cim_server stop / start  OR cimserver -s ; cimserver ).  Or you can just disable then re-enable the module.  There seems to be lots of memory leaks in the modules, or upgrade if possible.

- Identify the provider:
# ps -ef | grep cimprovagt
# cimprovider -l -s

- Disable provider sample:

#cimprovider -d -m MODULE

#cimprovider -l -s

or shutdown/start the module:
#cimprovider -d -m MODULE
#cimprovider -e -m MODULE

12.07.2011

excessive dots during HPUX startup

two ways to mitigate a bunch of dots during the startup script process on HP-UX:
Change the GSP/MP/iLO "asynchronous" port to the correct terminal
type: vt100 verses HPTERM. usually you can get in and do a "CA"
(configure asynchronous) and change the console terminal type there.

OR:
One suggestion I've seen on the HP forums is to try setting
"LIST_MODE=1" in /etc/rc.config.d/list_mode, rather than the default
value of zero. This forces the startup to use the same line-oriented
mode regardless of the terminal type. It might be worth a try.

11.29.2011

HPUX LVM logical volume size limit

2TB is the max size for a logical volme and file system on 11.23,
unless some patches are installed:
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=110&prodSeriesId=459574&prodTypeId=18964&objectID=c02742533

with the patches or on 11.31 it's 16TB

9.20.2011

AT&T vs T-mobile sim card in straight talk phone

difference between att and tmobile sim card in a straghttalk phone or service:

look at the SIM card numbers. If it starts with 890126 its T-mobile. 890141 for AT&T.
OR  check bottom of packaging of the phone. Look for the white label. Look on the right for an "A" or "T" (AT&T or T-mobile)

Packet tracing in HPUX

quick primer to packet tracing/logging/sniffing in hpux.  "nettl" network tracing and logging, no need for tcpdump (even though it's probably better).

get status on trace or logging:
/usr/sbin/nettl -status [log |trace |all]


start/stop trace:
nettl -tn pduin pduout loopback -e all -tracemax 65536 -f /tmp/me
nettl -tf -e all

the output file can be opened in wireshark/ethereal.

format commands
netfmt -vf nettl.LOG000 > /tmp/nettl.txt
netfmt -nl1f me.TRC000 > me.out


combine both nettl and netfmt to filter results:
add a filter to ~/.netfmtrc like the following for dns
filter tcp_sport 53
filter tcp_dport 53
filter udp_sport 53
filter udp_dport 53

then start the trace (be sure to turn off):
nettl -tn pduin pduout -e ns_ls_ip | netfmt -1
or
nettl -tn pduin pduout -e ns_ls_ip -m 250 -ks 10M -us 30M -nk 5 -nu 5 | netfmt -1

turn it off again, even if control-c (intr) was used:
nettl -tf -e all


tui/gui:
nettladm

9.14.2011

enable CDE on hpux

uncomment in inetd.conf:
dtspc stream tcp nowait root /usr/dt/bin/dtspcd /usr/dt/bin/dtspcd
rpc xti tcp swait root /usr/dt/bin/rpc.ttdbserver 100083 1 /usr/dt/bin/rpc.ttdbserver
cde rpc dgram udp wait root /usr/dt/bin/rpc.cmsd 100068 2-5 rpc.cmsd
rpc dgram udp wait root /usr/dt/bin/rpc.cmsd 100068 2-5 rpc.cmsd

then inetd -c (of course)

should be commented out in /etc/dt/config/Xconfig and /usr/dt/config/Xconfig:
#Dtlogin.requestPort: 0


update inetd.sec if it exists, change hostname to the server's hostname
dtspc allow 127.0.0.1 hostname

make the DESKTOP=CDE, either manually or through this: /usr/dt/bin/dtconfig -e

OR

$ ch_rc -a -p DESKTOP=CDE
$ grep -i desktop /etc/rc.config.d/desktop
DESKTOP=CDE


finally start CDE:
$ /sbin/init.d/dtlogin.rc start

check if running properly:
ps -ef | grep dt and netstat -an | grep 177
dtlogin should be running and UDP port 177 should be listening (for XDMCP traffic)

diagnostics command: /usr/contrib/bin/X11/dr_dt

not a tech topic - the real reason why they hate us

Be honest with yourself, they (the terrorists) don't hate and want to kill us because we're free and our culture is different from their's.  If that was true, then why haven't we been attacked earlier than the 1990's; why isn't Canada, Switzerland, and the Netherlands being attacked?

The real reason, which might be hard for some to accept, is that we have military bases, occupy their "holy land", and invade their country.  Violence is not acceptable, but put yourself in their shoes and ask what you would do if that was happening in your country.