11.19.2012

long hostname - kernel tuneable.

Long hostname - longer than 8 characters:

If a server is not properly configured for long host names, the kernel tunable  expanded_node_host_names  needs to be set to1 and the server may need to be rebooted (even though the kernel tunable parameter is dynamic).

I believe this only works if you have certain patches installed or at 11.31 or something, not sure.

10.11.2012

how to install apk on andriod device

beside using a file explorer or something like that to install and apk, here's a free user friendly service to install an apk:

archived versions of Flash player for Android

Since it's no longer available via google play/andrioid market -- Archived versions of Flash Player for Android (and others):  http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html

c7000 enclosure health degraded

if you see this in the OA system log: Kernel: Communication to an I2C device was lost temporarily, retrying...
 
but then you only see the enclosure health was "degraded" but nothing pointing to anything specific.
then you probably have a bad interconnect.  Try transitioning from Active to Standby OAs and the bad interconnect might show itself.

watch hulu on android by editing flash library via app

 
watch hulu by editing (automatically via app) the flash libraries to make it appear that the flash player is windows

10.10.2012

find the destination for DFS shares

find destination of DFS server/share name:
dfscmd /view \\domain\DFSshare /full
 
 
dfscmd *might* be from the support tools

10.04.2012

individual umask in sftp/scp

For HPUX (at least some of the 11.31 versions) the following can be used in sshd_config to set the umask for individual users or groups:
Add the following two lines at the end of the file to configure the sftp umask for a group of users.

Match Group  <group name>
ForceCommand  internal-sftp  -u 73

Or, add the following two lines at the end of the file to configure the sftp umask for a single user.

Match User   <user name>
ForceCommand  internal-sftp -u 73
of course you'll need to restart ssh by doing:  kill -HUP $(cat /var/run/sshd.pid)   or /sbin/init.d/secsh stop ;  /sbin/init.d/secsh start
from:

9.28.2012

syslogd cores

 HP-UX syslog crashes with a core file in /var/adm/syslog.   file /var/adm/syslog/core:  ELF-32 core file - IA64 from 'syslogd' - received SIGXFSZ
 
if none of your files in /var/adm/syslog are over 2GB, then change the LOG_SIZE to NOLIMIT in /etc/default/syslogd  like this:
 
query value:
ch_rc -l -p LOG_SIZE /etc/default/syslogd
 
set to NOLIMIT:
ch_rc -a -p LOG_SIZE=NOLOMIT /etc/default/syslogd
 
what happened is that OVO (HPOM) process opcle had syslog.log open and it hit 2GB so when syslog was recycled, the opcle process didn't release and the system still thinks that syslog.log is over 2GB.  That's the theory anyway.  I guess if that's the case you probably could just restart OVO/HPOM and that might fix it.

8.17.2012

Windows 7 enable lpr/lpq

enable lpr and lpq commands in Windows 7; by default it's not enabled
or turned on.

go into control panel and "turn windows features on or off" and under
"print and document services" turn on "lpr port monitor"

8.13.2012

EMC Open Migrator

move / sync data transparently to end user - better than rsync cause
it's synced real time via dynamic kernel module. it works on raw
logical volumes. Here's how it works. you configure new logical
volumes of the exact same size as the old ones using new LUNs (and a
new VG of course, which is a good time to maybe change the VG details
- max PE, etc). then create session files which "pair" up the old LV
to new LV. Once the sync is complete and you can take an outage,
unmount the old LV and VG and new ones too. Then stop the session and
mount the new stuff.

Open Migrator (OpenMigrator or OM) details:

create session file, /tmp/session1_pairs contents:
/dev/vg00/rlvol11 /dev/new-vg00/rlvol1


/sbin/stormigrate create -file /tmp/session1_pairs -session u01
/sbin/stormigrate list
/sbin/stormigrate activate -s u01
/sbin/stormigrate show -s u01
/sbin/stormigrate copy -s u01
/sbin/stormigrate query -s u01
/sbin/stormigrate query -i 5 -s u01
/sbin/stormigrate query -miostat -s u01


/sbin/stormigrate tune -ceiling 40
/sbin/stormigrate tune -mio_recover_action log
/sbin/stormigrate tune -mio_recover_action term

higher IO:
/sbin/stormigrate tune -iosize 128 -mio_perf_ratio 500


umount /u01
vi /etc/fstab -- update to san-np01
then deactivate session:
/sbin/stormigrate deactivate -s u01
/sbin/stormigrate delete -session u01

mount /u01
bdf /u01 -- verify using new VG and lvol

8.08.2012

dbprofile/​lanboot and PXE-E18 error

Use dbprofile and lanboot on an Itanium server but get this:
PXE-E18: Server response timeout.

and this shows up in the ignite server's syslog:
tftp: client does not accept options
receive: RRQ /opt/ignite/boot/hpux.efi octet blksize 16384
send: OACK  blksize 16384
send_file: recv: Can't assign requested address
receive: RRQ /opt/ignite/boot/hpux.efi octet blksize 16384
send: OACK  blksize 16384
send_file: recv: Can't assign requested address
receive: RRQ /opt/ignite/boot/hpux.efi octet blksize 16384
send: OACK  blksize 16384
Transfer timed out


Then add the following option to the tftpd entry in inetd.conf:
-s -r blksize

so something like this:
tftp        dgram  udp  wait   root /usr/lbin/tftpd    tftpd -s -r blksize /opt/ignite /var/opt/ignite


See this for full instructions:
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&taskId=110&prodSeriesId=4077173&prodTypeId=18964&objectID=c03083630

7.16.2012

get model nuber of SAS drive in RAID1 config

How to get the product number for a drive in a RAID1 mirror on a qlogic LSI SAS controller, typically on the first Gen BL860c (and other model) blades
 
You can get the product or model number for the individual drives:
sasmgr get_info -D /dev/sasd0 -v -q lun=all -q lun_locate
 
 
interestingly, I still can't find a way to turn on the UID/attention LED on an individual drive within a RAID1 set.

7.12.2012

change title bar in putty programmatically

here's some code for a shell script that will change the title bar text in putty (or other terminal/ssh apps):
 
title_bar.sh
params=$*
echo "\033]0;$params\007"
 
then call the shell script with whatever you want in the title bar:  ./title-bar.sh hello my friends     "hello my friends" will appear in putty's title bar.

7.09.2012

grocery shopping list on kindle touch

There's no notepad or writing app built-in on the kindle touch.  But there's a free checklist app from amazon that would make a good grocery or shopping list.
 
Search for "My Checklist" by Amazon Digital Services on the kindle store of amazon  It's not bad and free to boot.

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