5.10.2008

serviceguard error renaming hosts

The following is from renaming hosts or changing their IP addresses in a SG cluster.  In addition to changing all the cluster configuration files (cmclnodelist, cluster ascii, package ascii and control files) from the old names to the new names, you also probably need to delete /etc/cmcluster/cmclconfig (the cluster binary config file).  The old IP address are "stuck" in there and cmcheckconf or cmapplyconf  won't proceed without deleting the cluster binary file.

If you don't delete it, here's the message you will receive when running cmapplyconf or cmcheckconf:

Checking nodes ... Done
Checking existing configuration ... Done
Warning: Unable to get configuration for cluster CLUSTER_NAME
Error: Node HOSTNAME is refusing Serviceguard communication.
Please make sure that the proper security access is configured on node
HOSTNAME through either file-based access (pre-A.11.16 version) or role-based
access (version A.11.16 or higher) and/or that the host name lookup
on node HOSTNAME resolves the IP address correctly.
cmcheckconf : Failed to gather configuration information

5.07.2008

single vs. dual core in HP-UX

use machinfo:  /usr/contrib/bin/machinfo

the following hints are from: http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1209686

Single-core processors ======================
processor family: 31 Intel(R) Itanium 2 Family Processors


Dual-core processors ====================
processor family: 32 Intel(R) Itanium 2 9000 series
or
processor family: 32 Intel(R) Itanium 2 9100 series


So, processor family 32 means dual core;  processor family 31 means single core.

5.06.2008

get CPU speed on HP-UX

echo itick_per_tick/D | adb -k /stand/vmunix /dev/kmem | tail -1 | awk '{print $2/10000}'

or
sam  --> performance monitors,  system properties

Itanium:  11iv2
machinfo

5.05.2008

ECC agent fails or hosts don't appear

the hosts don't appear in the EMC Control Center (ECC) master server, or one does but then is replace by another. Sometimes the agent starts, but then unexpectedly quits/dies. If you clone your boxes, exclude /var/ECC or else!

Otherwise just: stop the agent; nuke /var/ECC ; restart agent is the fix for this issue it seems


open a http://powerlink.emc.com account and see the article: "Hostname change not reflected in ControlCenter console." EMC doc ID: emc139067

Looks like you also need to remove a couple more files in /usr/ecc/exec any files with the extensions .lck, .port, .uid and .comfile

3.14.2008

set up the IP stack in EFI on HP integrity servers

from an ignite DVD or even the boot disk of an HP-UX system:
cd \EFI\HP\TOOLS\NETWORK
load tcpipv4.efi
ifconfig sni0 192.168.1.50 netmask 255.255.255.0 up
route add default 192.168.1.1

ping 129.168.1.1

to reuse IP on different interface, unload the tcpipv4 driver, find the driver handle first:
dh
unload AF


not sure how to print the routing table, if anyone knows please comment ('route print') does NOT work.

3.05.2008

unable to uninstall Lenovo password manager FF extension

If you have already removed the client security stuff on your IBM Lenovo Thinkpad, but are still unable to uninstall the thinkvantage password manager extension / add-on from Firefox because the button is disabled or greyed out here's how to manually remove it:

Delete the registry entry for it in:
HKEY_CURRENT_USER\Software\Mozilla\Firefox\Extensions "{FCF36B88-1BBA-487f-B64B-D2E8980A9293}"="C:\Program Files\Lenovo\Client Security Solution\PWM Firefox Extension"

2.22.2008

Strip Out the Formatting before pasting

I've been looking for a good, small, unintrusive tool to strip all the rich text formatting when copying from a web page to a office, word, excel or any app that accept rich text or web formatting.
Strip Out the Garbage Code Before You Blog | Shaun Low explains the PureText tool. It sits in the systray and is less than 30k in size, requires no install. http://www.stevemiller.net/puretext

2.11.2008

don't use PHNE_35793 on HPVM

from http://www12.itrc.hp.com/service/patch/patchDetail.do?patchid=PHNE_35793&sel={hpux:11.23,}&BC=main|search|

       - An HPVM guest that uses a virtual interface that belongs
         to an IGELAN interface configured on the HPVM host can
         experience hangs with network services like ping, NFS,
         rcp, ftp for data transfers which use full-sized
         frames.  This behavior is observed with HPVM 2.0 and
         HPVM 3.0.

oh, and HPVM 1.2 either

2.05.2008

ECC agent fails or hosts don't appear

the hosts don't appear in the EMC Control Center (ECC) master server, or one does but then is replace by another.  Sometimes the agent starts, but then unexpectedly quits/dies.  If you clone your boxes, exclude /var/ECC or else!

Otherwise just: stop the agent;  nuke /var/ECC ; restart agent is the fix for this issue it seems

memory card insert - won't autoplay

After installing vmware server, I couldn't get memory card inserts into Windows XP to autoplay and bring up the "scanners and camera wizard". It's caused by vmware server putting a policy (registry) in place to disable autorun.

To fix:
delete: HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutoRun
and HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutoRun

Discovered by:
Is there Autorun after VMWare? | Terry Pearson's Blog

2.01.2008

merging PDF files for free

download ghostscript.  run the following:
gswin32 -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=Merged.pdf -dBATCH 1.pdf 2.pdf 3.pdf

from:
https://www.cs.tcd.ie/Shane.OConchuir/Misc/MergingPDFs.html

1.30.2008

don't vxupgrade /stand and /

Don't be a moron and do what I did: vxupgrade /stand and /

http://www11.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=ucr_na-KMN8606454124_ssb-1

Quoting:
On system using VxFS4.1 on HP-UX 11.23, the disk layout version
for "/" (root) and "/stand" may become unusable.

The commands vxupgrade and vxfsconvert in vxfs 4.1 and later have
the ability to upgrade the disk layout version of / and /stand
to dlv 6+.

The HP-UX bootloader cannot recognize the upgraded disk layout
and is unable to find a kernel to boot.

1.22.2008

create virtual media iso file

the following was derived from http://www.docs.hp.com/en/5991-6250/ch04s01.html

create an ISO file suitable for EFI environment using the Virtual Media option on the HP BL860c blade servers

in linux:
create a boot image big enough to fit the files you want on the CD (5MB example):
dd if=/dev/zero of=/tmp/boot.img bs=1024 count=5000

make a fat file system on it:
mkfs.msdos /tmp/boot.img

mount it:
mount -o loop -t msdos /tmp/boot.img /tmp/bootcd

copy any files needed into the mount point (/tmp/bootcd)

unmount the device:
umount /tmp/bootcd

create the directory structure to hold the dos file system:
mkdir -p /tmp/isofolder/boot

copy boot.img to the directory created above

create the iso file:
mkisofs -o mynewiso.iso -b boot/boot.img -c boot/boot.cat -no-emul-boot /tmp/isofolder
(optional -J and -R, joliet and rock ridge extensions)

note: from the EFI, only the msdos file system (boot.img) will be usable, the rest of the image will only be fully usable once the OS boots.  (HP-UX only supports virtual media on 11.23 Dec 2007 and Higher)

1.17.2008

Help USB to serial adapter

I'm looking for some advice:  anyone out there that uses a USB to rs232 serial adapter to connect to the local console port on HP9000 boxes successfully on several old and new models?

I bought a USB-serial adapter at best buy, installed the drivers and connected it to a local console port of several rp2450.  I can only receive screen updates from the console, but my keystrokes (transmit) isn't working from the PC to the console port.  However, on a new BL860c blade and an L1500 I can both send and receive via this usb-serial adapter.

Do you have a clue what could be the problem?  If anyone reading this blog knows, please post a comment!  Thanks  >/dev/null

GSP firmware notes

If you aren't locally connected to a GSP and want to upgrade the firmware, you can do it via the lan console. You'll have to either be connect via local console or via the GSP's internal port.

All of the following information was gleaned from:
http://forums12.itrc.hp.com/service/forums/questionanswer.do?sortPointsFlag=1&threadId=836831&admit=109447627+1200601321780+28353475

to get the version of the GSP: the 'he' command will show version in the first line of output:
Hardware Revision 8 Firmware Revision A.01.10 May 24 2001,11:05:55


to access the GSP via the "internal port", which might not work on all GSP versions:

create the device file for the gsp internal port, delete device file when done for security reasons:
cd /dev
mknod tty1p0 c 1 0x010000


vi /usr/lib/uucp/Systems and add the following line exactly:
gspiport Any;5 gspiport,f900 - ''''\r\d\r\d\r ogin:-BREAK-ogin: uucp asswrd: uucp-BREAK-ogin: uucp asswrd: uucp


vi /usr/lib/uucp/Devices and add the following exactly:
gspiport tty1p0 - 9600 direct

connect via:
cu -l /dev/tty1p0

do the firmware upgrade via the XU command.

to exit the cu command type the following two characters: ~.

download latest gsp revision A firmware from: http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1190612

1.15.2008

change dce account description "gecos field"

How to change dce account description: "gecos field"

login to dce:  dce_login

then open the dce command prompt:   dcecp

at the dcecp> prompt, change the description of the ssl account; replace whatever you want between the quotation marks:

dcecp>  account modify -description "This is, part 2, of the, 4 part gecos field"  this_dce_account

then view the account change:

dcecp> account show this_dce_account

AT&T Labs Text-to-Speech: Demo

cool text to speech via a web site. Has enlish, UK english, French, German, Spanish and Indian-accented English

AT&T Labs Text-to-Speech: Demo

1.13.2008

TV Converter Program Website

Digital TV converter box coupons: converter box needed for digital to analog conversion after february 2009
TV Converter Program Website

1.08.2008

Please, for the love of God

Never, ever have any business dealings with this crack-whore of companies, Network Solutions.
NetworkSolutions Scandal: Hijacking User Domain Searches and here: http://commandline.org.uk/more/squat-for-the-win-2008-01-09-03-36.html
Use Godaddy or 1and1.com or some other up- and up business.

12.10.2007

mailto links to web mail

greasemonkey script that routes all mailto links to web based email such as Yahoo mail and Gmail, and Google Apps mail (your domain)

Mailto 2 Webmail – Userscripts.org

11.08.2007

rename file extensions easily in Unix

In dos you could:
move *.txt *.cvs

but the wildcard characters don't work that way in unix. You must do something like the following, where EXT1 is the original extension and EXT2 is the new one:

for i in *.EXT1
do
mv $i ${i%.EXT1}.EXT2
done

for example: to rename all .txt files to .ascii run the following shell script:
for i in *.txt
do
mv $i ${i%.txt}.ascii
done

5.07.2007

HPUX: lpadmin - can't open member file

problem adding a printer on HPUX (10.20 in my case, but this error occurs on all versions)
lpadmin: can't open member file

one possible cause:
/etc/lp needs to be owned by the 'lp' user id.

# ll -d /etc/lp
drwxr-xr-x   8 root       bin           1024 May  7 15:54 /etc/lp

fix:
chown lp /etc/lp

4.12.2007

Naviagent not responding on unix host

Had two hosts that were not responding to navisphere, "agent is unreachable" or some bable...

on each host there was a /agentID.txt file that the agent reads before re-creating the /etc/log/HostIdFile.txt     The purpose of agentID.txt is to make naviagent bind to a specific IP address on a multi-homed system.  The IP address listed in the file doesn't need to exist on the system, it uses the IP without verification.

I stopped the agent, deleted both HostIdFile.txt and agentID.txt, then started the agent and it now is using the correct IP address in HostIdFile.txt


3.20.2007

rlogin problem - unable to allocate pty

only affected rlogin, not telnet.  Only one concurrent rlogin connection works, others fail with the following:

$ rlogin host
rlogind: Unable to allocate pty on remote host.
Connection closed.

resolution:
$  insf -d pts -s 512

ITRC   DOCID: KBRC00014047   Now I can login multiple times

3.17.2007

make Firefox in Ubuntu look much better

The look and feel of web pages in FireFox in Ubuntu (possibly other Linux distros) by default stinks (in my opinion).  Trying to convert myself from Windows solely to Linux, this has been hard, but I found a way to make the fonts look really good in Firefox (improves the entire experience):
http://www.ubuntuforums.org/archive/index.php/t-91280.html

Change the fonts in preferences:

where it says, serif, select 'Bitstream Vera Serif'
where it says, Sans-serif, select 'Bitsteam Vera Sans
where it says, Monospace, select 'Bitsteam Vers Sans Mono'

how to: switch from Windows to Linux

My switch from Windows XP to Ubuntu Linux:

convert RPM to DPKG for installing:  install the package called 'alien'

http://diveintomark.org/archives/2006/06/26/essentials-2006

powerfail scsi messages in syslog

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=15842&admit=-682735245+1161469244473+28353475

ll /dev/dsk | grep 052200

0x1f052200
The First two hex digits (1f - 31 decimal) denote the major device number. If you do an lsdev, you will note that 31 is the scsi disk block device.

After that it decodes as follows the following hex digits:
05 - c5
2 - t2
2 - d2
00 - the last two minor device digits are driver specific
But yours is: SCSI Block Disk Device, c2t2d2

the last 6 digits are the minor number of the device.

OVO agent: opcagt error on start

hostname.root /$ /sbin/init.d/opcagt start
Error opcctla   (Control Agent)(21829) : Errors occurred during the read of the
ITO subagent registration file. (OpC30-1250)
Error parsing source file /var/opt/OV/conf/OpC/agtreg - syntax error in line 1. (OpC30-2604)
ERROR:   Problems with starting OpC Agent processes or none configured.

hostname.root /$ /var/opt/OV/conf/OpC/agtreg
hostname.root /$ /sbin/init.d/opcagt start
hostname.root /$
hostname.root /$

hostname.root /$ rm /var/opt/OV/conf/OpC/agtreg

hostname.root /$ /sbin/init.d/opcagt start
Error opcctla   (Control Agent)(22144) : Errors occurred during the read of the
ITO subagent registration file. (OpC30-1250)
Can't open configuration file '/var/opt/OV/conf/OpC/agtreg' for reading.
No such file or directory (OpC20-202)
ERROR:   Problems with starting OpC Agent processes or none configured.

hostname.root /$ rm /var/opt/OV/conf/OpC/agtreg
hostname.root /$
hostname.root /$

hostname.root /$ /opt/OV/bin/OpC/opcagtreg -add /opt/OV/bin/OpC/install/itoagt.reg
hostname.root /$ /sbin/init.d/opcagt start
OpC Agent processes successfully started.


lock / unlock account user id on HP-UX trusted system

/usr/lbin/getprpw useraccount
unlock / enable / reactivate:
/usr/lbin/modprpw -k useraccount

lock / expire password:
/usr/lbin/modprpw -e useraccount

Do not use a capital E, as it will expire the password on all user accounts.

nfs / rcp / CDE issue

This problem seems to keep happening since this box was upgraded to 11.11.  The rpc/nfs daemons seem to restart at 00:05.  Killed all fin_wait_2 connections and restarted nfs/rpc daemons.:

stuff=$(/usr/bin/printf "%.2x%.2x%.2x%.2x%.4x%.2x%.2x%.2x%.2x%.4x\n" \
$(/usr/bin/netstat -an -f inet | /usr/bin/grep FIN_WAIT_2 | \
/usr/bin/awk '{print $4,$5}' | /usr/bin/sed 's/\./ /g'))

for x in $stuff
do
/usr/bin/ndd -set /dev/tcp tcp_discon_by_addr $x
done


 /sbin/init.d/nfs.server stop ; /sbin/init.d/nfs.client stop ; /sbin/init.d/nfs.core stop
 /sbin/init.d/nfs.core start ; /sbin/init.d/nfs.client start  ; /sbin/init.d/nfs.server start


solution:  It was being caused by a cronjob stopping and starting rpc, but was not doing it correctly.

3.16.2007

NFS exports to PC clients on EMC Celerra

Doing NFS exports to a PC client normally requires and authentication daemon running on the host system: pcnfsd on unix systems, just referred to as pcnfs on EMC Celerra   So it's more complicated than setting up NFS for Unix clients.

do a powerlink (powerlink.emc.com) search for: pcnfs celerra
look for a pdf document titled: Configuring NFS on Celerra
one of the appendixes: NFS Authentication for PC Clients

There's also a primus article regarding pcnfs: emc43806, below is the gist of the article:

# Set up a user account.
#     Open the /nas/server/server_x/netd file with a text editor, add pcnfs on a separate line, and save the file.
#     Where x is the number of the Data Mover.
#     Reboot the Data Mover.
#     Export a file system for the user(s) to access.
#     On the PC, launch the PC-NFS. Refer to the vendor's respective user manual for details on what is required
          at this point for setup and/or login.
#     Enter the username and password as required by the software package.

3.11.2007

update DST for Linux and BSD (freebsd, openbsd, etc)

Here's a good article on how to update your timezone information files for the new Daylight savings time rules for 2007:  http://articles.techrepublic.com.com/5100-10877_11-6163042.html?part=rss&tag=feed&subj=tr

The proper file to download is tzdata2007 c.tar.gz   not the tzdata2007b.tar.gz noted in the article.

3.03.2007

2.28.2007

remsh - There is no passwd entry for you

Doing an remsh or rlogin and receiving the following message:  "There is no passwd entry for you"   means that something in the local password file is screwed up.   In my case, a daemon was changing it's password entry and kept adding ....,  to the password field until it started to span multiple (10) lines in the password file.  Any system call that would search the passwd file would stop at the screwed up entry.  Removing and fixing the messed up entries solved the problem.

Some other symptoms of this include having a blank user name when doing the 'id' command:
$ id
uid=12345() gid=20(users)

2.26.2007

vi session hung (old IBM version of vi)

$ vi

UNIX Visual Text Editor Front End Utility
Copyright (C) 1996,1997 IBM Global Services
A vi session is already in progress.

fix:
delete /var/adm/vi.lock

HP-UX hangs at boot

Boot problems:
panic: lv_fixrootlv: Stale extent array overflow

cause: volume group header and /etc/lvmtab out of sync when logical volumes are mirrored.
fix:
  • boot into lvm maintenance mode: hpux -lm
  • activate vg00: vgchange -a y vg00
  • vgdisplay vg00 -- shows 3 current PV and 2 Active PV (or whatever the discrepancy is)
  • unmirror logical volumes:
    • for i in 1 2 3 4 5 6 7 8 9
    • do
    • lvreduce -A n -m 0 /dev/vg00/lvol$i
    • done
  • vgreduce -f vg00
  • now vgdisplay vg00 shows the same number of current and active PV

2.25.2007

logname error in rlogin session on particular tty

when you rlogin and your tty is pts/0 (/dev/pts/0) you might get the following message when trying to execute logname:

logname: could not get login name

It appears that rlogind doesn't update /etc/utmp This of course appears to be intermittent if you have several clients doing rlogins, the first one that uses /dev/pts/0 will have the problem, the other will probably be fine. This is more of a problem if you are using the logname command in something like /etc/profile

Only noticed this on 11.23 (both IA and PA platforms). Both had PHNE_32818 installed. A possible fix is PHNE_33792, but I couldn't test it. A workaround is to use the variable $LOGNAME instead of the command logname.

2.15.2007

get the timestamp formatted the way you want

ls in HPUX and most other *nix versions just plain sucks giving the output you need.  see the following section of the HPUX ls(1) man page:
           -l   (ell) List in long format, giving mode, number of links,
                owner, group, size in bytes, and time of last modification
                for each file (see further DESCRIPTION and Access Control
                Lists below).  If the time of last modification is greater
                than six months ago, or any time in the future, the year is
                substituted for the hour and minute of the modification
                time.  If the file is a special file, the size field


get the month day year Hour minute second of timestamp of a file (modification):

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=105260&admit=-682735245+1171602387200+28353475

I believe this uses the stat function.

2.13.2007

finding hard links / hard link count in file systems

link column (second column) in ls -l output (hard link count):
a directory will always have a minimum of 2 links.  One for the directory itself and one for the . (current directory) inside the directory.
any additional subdirectories directly under the directory count as an addition link for the directory because of the .. (parent) directory entries inside each subdirectory.


to find hard links:
ncheck -F vxfs /dev/vg00/lvol6 | sort -n | awk '$1==prev{print last;print $0}{prev=$1;last=$0}'

2.07.2007

HBA part number on HPUX systems

how to tell HBA part number in HP-UX using fcmsutil
fcmsutil /dev/<device>  ( find from ioscan -fnC fc )

Device ID  part number
0x001028   A5158A - 1GB
0x001029   A6795A - 2GB
0x002312   A6826A - 2GB dual port PCI-X

2.04.2007

uncommon serviceguard errors - coredump, IP netmask

cmcheckconf coredumps when "gathering network configuration"

this is because one of the standby lan interfaces on one of the nodes has been plumbed (ifconfig plumb) or is assigned an IP of 0.0.0.0 in netconf.  unplumb the interface (see ifconfig), or remove it from netconf before running cmcheckconf or cmapplyconf.



Error: IP netmasks don't match, interface lan0 on node0
Error: IP netmasks don't match, interface lan0 on node1

but if your netmasks do match properly and currently in netconf, then the cluster binary file needs to be deleted and recreated from the ascii file.

2.01.2007

get serial number of server hardware in Linux

In Redhat Enterprise or maybe other linuxes to poll the serial number of the server or workstation hardware from the bios using dmi:
dmidecode

May have to install the package from repositories.

1.17.2007

HP Itanium systems - EFI ref guide

EFI reference guide: http://docs.hp.com/en/5991-1247/ch04s13.html  and  http://docs.hp.com/en/A5201-90017/index.html

configure IP aliases on AIX

Navigate in smit:
Communications Applications and Services
 TCP/IP
  Further Configuration
   Network Interfaces
    Network Interface Selection
     Configure Aliases

OR
smit inetalias

chdev -l 'en1' -a alias4=x.x.x.x,y.y.y.y

where x.x.x.x is the address and y.y.y.y is the netmask

1.11.2007

fsadm error shrinking file system

HP-UX 11.00  - fsadm:  cannot shrink /dev/vg00/rlvol6 - upgraded fs - inodes are currently in use.

resolution: upgrade to 11.11 to get the new JFS 3.3 and related tools.

12.15.2006

EMC Clariion array - using powerpath vs pvlinks

I think I've found the answer to whether or not we should use Pvlinks when configuring our volume groups in HP-UX - the answer being no.  It's only recommended to use alternate links when booting from a storage array, which we don't do on any of our HPUX hosts.

From the powerpath admin guide:

EMC recommends using LVM alternate links (PVLinks) when you
boot from a storage system. If the primary path fails, an automatic
switch to the alternate path occurs. If PowerPath is not installed,
using alternate links increases availability in the event of hardware
problems.
PowerPath uses alternate links as part of its boot/root failover
strategy, but not for load balancing, path prioritization, or other
PowerPath-related reasons. Thus, EMC recommends that you use
LVM alternate links when booting from a storage system. Otherwise,
EMC recommends disabling PVLinks when using PowerPath.

12.10.2006

powerpath check force: "Cannot remove device that is in use"

removing some ports on a clariion on a HP-UX host running service guard, I received the following:
$ powermt check force
Warning: CLARiiON device path c13t2d3 is currently dead.
Cannot remove device that is in use: c13t2d3

Powerpath is pretty darn smart; the last port 0 linked to a disk device was part of the same lvm volume group as one of my cluster lock disks.  It wasn't even listed in as the lock disk for my cluster (in the cluster ascii file), but it was in the same volume group that the lock disk was in.

I had to stop the cluster services on the node, then powerpath allowed me to remove the connection.  This node of the cluster is currently the failover node, so I was able to bring er down without any impact.

HP codewords

codewords used for optional additional pay software in  HP-UX are stored  here in the following format:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=647238&admit=-682735245+1165692579832+28353475

/var/adm/sw/.codewords

#CD_part_number Customer_Id IdType Codeword

manuall set speed and duplex during ignite

set speed and duplex for ignite, instead of relaying on auto-Negotiation:
http://docs.hp.com/en/B2355-91049/ch05s07.html

12.04.2006

vgscan not working / ignite not recreating volume groups

I encountered a problem the other day with ignite not recreating the volume groups properly - it was caused by a component of service guard that was stuck on that machine.  For some reason (maybe because serviceguard was once installed on the box), the file /dev/slvmvg (serviceguard file for shared volume groups) also prevented vgscan from working.  Once I removed the file, vgscan created the volume groups without a problem.

12.02.2006

gig card on hp-ux 11.00 doesn't keep speed/duplex setting

A 1000Base-T card in an 11.00 box was giving me grief.  the switch port was set to 100 full duplex, but the card kept staying at AUTO even though the speed/duplex was changed via sam and verified in the /etc/rc.config.d/hpgelanconf file; that, of course, cause collisions and a bunch of network errors because the card negotiated 100 half duplex.  There's a patch that fixes the issue:  28995   make sure the config file has the speed and duplex value in uppercase:

HP_GELAN_SPEED[0]=100FD

11.24.2006

swinstall and rpc exception communications error

error when doing an swinstall:
       * Beginning Selection
ERROR:   RPC exception: "Communications failure (dce / rpc)" 11/24/06
         17:27:01 PST
ERROR:   A Remote Procedure Call to a daemon has failed.  Could not
         start a management session for "myhost:/".  Make sure the host
         is accessible from the network, and that its daemon, swagentd,
         is running.
       * Target connection failed for "myhost:/".
ERROR:   More information may be found in the daemon logfile on this
         target (default location is myhost:/var/adm/sw/swagentd.log).
       * Selection had errors.

fix by restarting swagentd:
/sbin/init.d/swagentd stop
/sbin/init.d/swagentd start

11.20.2006

mkboot complains about logical volumes when none exist

$ mkboot /dev/dsk/c2t6d0
There appear to be non-boot logical volumes on this device.
Overwriting them could destroy all the data on this device
Should the logical volumes be overwritten [y/n]? y

solution:
because PV isn't marked as bootable.   pvcreate -B /dev/dsk/c2t6d0
or
PV belongs (or thinks it does) to a volume group already.  (tread lightly here!):
Fix by using the -f (force) option:  pvcreate -Bf /dev/dsk/c2t6d0 

11.19.2006

upgrade vxfs online

update version 3 veritas JFS file system to version 4

vxupgrade -n 4 /mount_point

vxfsconvert -- offline version or to convert an HFS

11.17.2006

my favorite vim settings

my vimrc is customized with these, my favorite settings and options for vim / gvim:

set ic
colorscheme torte
set nobackup
set showmatch

11.11.2006

dmisp daemon on HP-UX hogging CPU

It's no longer used much anymore and there's a bug in it which will cause it to consume tons of cpu on the system.  Turn it off:

ps -ef | grep -i dmisp
/sbin/init.d/Dmisp stop
ch_rc -l -p START_DMI ; ch_rc -a -p START_DMI=0 ; ch_rc -l -p START_DMI

11.06.2006

Google Toolbar shortcut - firefox 2

Customize Firefox (2), remove the History menu so that the google toolbar shortcut key will work. If the history menu is present, it overrides the keyboard shortcut for the google toolbar focus (alt - s). Use the instructions here: Geek to Live: Consolidate Firefox's chrome - Lifehacker

The History Menu used to be called the "go" menu, so use the #go-menu keyword

11.03.2006

11.01.2006

NFS / PCNFS / Hummingbird Maestro problems

NFS maestro PCNFS mounts on PC doesn't work for user. (invalid username or password)    UID of user is too big.  Either change the UID to less than 60002 or uidrange needs to be added to the pcnfsd.conf file.

     http://docs.hp.com/en/5991-1153/ch02s02.html
    If your PC NFS client software is assigning user IDs smaller than 101 or greater than 60002, set the uidrange in the /etc/pcnfsd.conf file to allow access to a different range of user IDs, as in the following example:
    
    cat /etc/pcnfsd.conf
    uidrange 101-9999999
    
    then:
    kill rpc.pcnfsd
    /usr/sbin/rpc.pcnfsd


10.28.2006

difference between autoboot and autostart flags on HP 9000 hardware

difference between autoboot, and autostart flags in the PDC, BCH menu:

From: http://docs.hp.com/en/A7137-96003/A7137-96003.pdf (rp3410 rp3440 operations guide)

When the autostart flag is off, autoboots will be interrupted if a configuration change occurs
which causes reduced performance; thus requiring you to intervene prior to booting to the
internal system loader (ISL).
The auto boot will halt at the BCH prompt and you may continue booting by entering boot.

10.27.2006

cron - run command last day of month

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=123030&admit=-682735245+1161911384666+28353475
Solves the problem of running a script on the last day of the month. Put 28-31 (for days) in your crontab and put this little section in for date determination.

#!/bin/sh

if test `TZ=MET-24 date +%d` = 01
then
exec command
else
exit 1
fi

pseudo swap on HPUX

explanation of pseudo swap in hp-ux:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=103008

10.25.2006

gmail macros

Great keyboard navigation inside gmail using a greasemonkey script.: http://persistent.info/ do a search for gmail macros (or christmas)


Here's a google group that tracks the script and has some enhanced versions: http://groups-beta.google.com/group/gmail-power-users

10.10.2006

logins man page

HP-UX 'logins' command displays user account info.  the -x option doesn't explain the last field reported:

PS 100506 7 175 -1

the last field is the number of days before the password expires to start warning the user.  see the warn option of passwd(1) man page and passwd(4).  The warn flag only works on trusted systems, so you'll see a -1 for non-trusted systems.

Remember that the system (at least on non-trusted boxes) will round to the nearest week, Thursday to be specific.  So the report of when the passwd was last changed is not the actual day it happened, unless it happened to fall on a Thursday.

10.06.2006

Gnome / KDE keyboard shortcuts

Linux Desktop manager: Gnome and KDE keyboard shortcuts
http://www.novell.com/coolsolutions/tip/2289.html

non-printable chars in filename

ls -al on a directory produced a "blank" file name.  to see the non-printable  character, pipe the output to more:

ls -al | more

The file show up as a DEL char (^?); so to delete or view the file do a control-v and ? for the filename.

configure HP-UX kernel

http://docs.hp.com/en/B2355-90675/ch06s02.html
Synopsis:

cd /stand/build
/usr/lbin/sysadm/system_prep -v -s system

make changes to the /stand/build/system file to add or remove whatever
/usr/sbin/kmsystem -S /stand/build/system -c Y driver-name

creates the /stand/build/vmunix_test
/usr/sbin/mk_kernel -s /stand/build/system

mv /stand/system /stand/system.prev
mv /stand/build/system /stand/system


updates /stand/vmunix and create a bacup /stand/vmunix -> /stand/vmunix.prev before.
/usr/sbin/kmupdate -- tells shutdown script to do the above.

10.01.2006

determine bitness of HPUX

HP-UX 64 or 32 bit? :  getconf HW_CPU_SUPP_BITS

Sometime you need to determine this whether to install the 32 or 64 bit version of ODE.

9.26.2006

password aging on non-trusted systems

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=605201
At the end of the encrypted password you add char1, char2.
char1 is the maximum number of weeks the password is valid and
char2 is the minimum number of weeks that must pass before the password can be changed. The following is a good guide: Value # of weeks
. 0
/ 1
0-9 2-11
A-Z 12-37
a-z 38-63
so for example if you wanted a user to change their password somewhere between 11 and 2 weeks you would put ,A9. (man 4 passwd)

problem changing password on trusted system (HPUX)

Try changing password on a HP-UX trusted system and get the followin:
Password cannot be changed.  Reason: Cannot access protected password entry.

This means the auth files in /tcb are out of sync with the /etc/passwd file.  Someone may be making changes manually to the /etc/password file (like adding user acocunts), but that doesn't update or create the appropriate entries in /tcb/files/auth

check it by running the authck -p  (or pwck -s) command to verify the trusted computing base /tcb  This doesn't fix the problem, you'll have to delete (from /etc/passwd) and add again (via sam or useradd) or use the pwconv command.


9.14.2006

HPUX trusted system

How to determine whether HP-UX system is trusted or not:
/usr/lbin/getprdef
or look for /tcb

8.26.2006

No manual entry for man

error message when trying to get standard man pages: No manual entry for XXXX

I figured out why the normal man pages don't work on some systems.  The file /etc/MANPATH overrides the MANPATH variable when /etc/profile runs.  So to fix it just add the "normal" man page locations to /etc/MANPATH:

/usr/share/man:/usr/contrib/man:/usr/local/man:

resizing terminal and fixing

eval $(ttytype -s)
or
eval $(resize)    -- xterms

HP 9000 servers model numbers

Good reference to use between the 'model' command and the 'standard' name for the server model:
http://www.openpa.net/systems/

ITO / OVO Openview java client

HP ITO, OVO Openview Operations java client for windows, command line options:

C:\Program Files\Hewlett-Packard\HP VP Java Console>
"C:\Program Files\Hewlett-Packard\HP VP Java Console\ito_op.bat" -help
started with the server hostname as the first parameter.
You can also select from the following parameters:
 -user "username"    ... "username" for login
 -passwd "password"  ... "password" for login
 -server "hostname"  ... default server for login (same as first parameter)
 -display "hostname" ... sets display hostname for X applications
 -nowin              ... starts JavaGUI without a DOS window
 -plugin             ... starts JavaGUI as plugin
 -trace              ... enables tracing
 -nosec              ... disables secure JavaGUI
 -help               ... displays this page

My normal run string:
"C:\Program Files\Hewlett-Packard\HP VP Java Console\ito_op.bat"  -server my_server_name -nowin -user myuseraccount

8.21.2006

fsadm - fails with error extending file system

Encountered on HP-UX 11.00:

/$ fsadm -F vxfs -b 20448M /directory
vxfs fsadm: cannot open /directory/lost+found/.fsadm - errno 2

ls /directory   --- no lost+found there.

man mklost+found

cd /directory

/directory$ mklost+found
creating slots...
removing dummy files...
done
drwxr-x---   2 root       sys           4096 Aug 21 09:34 /directory/lost+found

now fsadm succeeds

8.18.2006

sendmail/mail command drop_privileges error on HP-UX

problem with HPUX sendmail, conversation and solution follows:

$ echo hi | mailx -s "test" myemail@mydomain.com
$ drop_privileges: setuid(0) succeeded (when it should not)

$ ll /usr/sbin/sendmail
-r-sr-sr-t   1 nonroot    mail       1339392 Aug 26  2004
/usr/sbin/sendmail

should be owned by root:mail

$ /sbin/init.d/sendmail stop
No sendmail server running
$ /sbin/init.d/sendmail start
drop_privileges: setuid(0) succeeded (when it should not)
451 4.0.0 can not chdir(/var/spool/mqueue): Permission denied


$ chown root /usr/sbin/sendmail
$ ll /usr/sbin/sendmail
-r-sr-sr-t   1 root       mail       1339392 Aug 26  2004
/usr/sbin/sendmail
$ /sbin/init.d/sendmail start
/etc/mail/aliases: 7 aliases, longest 9 bytes, 88 bytes total
sendmail

8.16.2006

how to erase disk in HP-UX

HPUX (or any *nix):
http://unix.derkeiler.com/Mailing-Lists/HP-UX-Admin/2006-06/msg00035.html


I like the concept of destorying all luns, creating a big one and doing a dd of /dev/zero over the raw disk special file.

convert dos unix format in VIM

Here's a vim tip to convert unix to dos or vice-versa.  VIM doesn't have an option in it's file / Save As dialog box.
http://www.vim.org/tips/tip.php?tip_id=145

:set fileformat=dos    or unix or mac
:w

8.12.2006

synergy with PCs

Interesting open source project: http://synergy2.sourceforge.net/  Synergy allows you to have multiple PCs all on each own monitor using just one keyboard and mouse.

8.02.2006

sendmail error sending mail on HP-UX

Sending mail on hpux
/etc/mail/sendmail.cf: line 691: fileclass: can not open /etc/mail/sendmail.cw: World writable directory

The permissions on /etc are incorrect -  Changed it to the HP-UX standard 555 (r-xr-xr-x) by: chmod 555 /etc  Ran a test: echo test | mailx me@mycorp.local  Received email successfully, no error message.

7.20.2006

X error running Openview

when running the Openview (ovw) Xclient on HPUX that's pointing to the X11 server in Cygwin (Cygwin/X), you may get the following errors:
ovw: Xt Warning: Missing charsets in String to FontSet conversion
ovw: Xt Warning: Unable to load any usable fontset


fix it by changing the startxwin.bat file to add the -fp (font server) parameter to the run line.  Point to the server that has Openview installed on it as the font server:
%RUN% XWin -multiwindow -clipboard -silent-dup-error -fp tcp/ovoserver.mycompany.com:7000

7.14.2006

what to do about dns outages - plan ahead

What are you supposed to do when your broadband provider's DNS servers are foobarred? First, at the very least you need to know the IP of another DNS server you can point to; great one to try is OpenDNS For instance: standard cable modem - router running dhcp on the lan side. For some reason dns queries don't work, do an nslookup, queries time-out. In Windows: Since you're typically using dhcp client it's a PINA to change this via the ncpa gui, so do it through netsh.

eth0 = the name of my interface. Since most of you are lazy and don't name your connections (like a *nix admin would), your's is probably "Local Area Connection".

netsh int ip set dns eth0 static 208.67.222.222
and where the IP is a DNS server.

Server: resolver1.opendns.com
Address: 208.67.222.222

Name: resolver2.opendns.com
Address: 208.67.220.220

Recover deleted files

Another undelete/recovery tool:  http://www.z-a-recovery.com/

7.10.2006

remote shell error on HP-UX

remsh (remote shell) into a trusted system, got this error:
remshd: Login disallowed (audit error)

Do an /usr/sbin/authck -pv
Check for duplicates in /etc/password  if duplicates are found, then remove them via vipw.

7.05.2006

flash format screen capture

Useful for tutorials or how-to videos in that flash is install on almost all PCs out there.  Here is a description from the website: "Wink is a Tutorial and Presentation creation software, primarily aimed at creating tutorials on how to use software (like a tutor for MS-Word/Excel etc). Using Wink you can capture screenshots, add explanations boxes, buttons, titles etc and generate a highly effective tutorial for your users."

http://www.debugmode.com/wink/

6.30.2006

sed (text/replace) in Windows

use sed for Win32 to modify text/configuration files on the fly:
http://www.cornerstonemag.com/sed

6.29.2006

Listing open ports and associated program in HPUX

netstat in linux has the -p option for listing the
program/application/PID that is using a port. You can't list open
ports like that in HP-UX, but you can use the lsof command to list
them:

# lsof -i tcp:200

ITRC forum link

6.24.2006

speed up Windows XP for benchmarking

For benchmarking, and to force background processing of idle tasks:
rundll32.exe advapi32.dll,ProcessIdleTasks

http://www.microsoft.com/whdc/system/sysperf/benchmark.mspx#EFF

6.23.2006

pipe standard error with standard output

With the posix shell (maybe other shells like korn), to pipe not only standard output, stdout, but also standard error, stderr, use the following:

first_command 2>&1 |  next_command_in pipe

See the following:  http://www.linuxdevcenter.com/pub/a/linux/lpt/13_01.html

HP-UX EMS alerts with EMC

See the following email thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=405726&admit=-682735245+1151047006669+28353475

In HPUX, if you get serious severity alerts coming from disk_em EMS monitor on EMC disks/luns, it's because the version of OnlineDiags does not work with EMC LUNs that identify themselves as using HP03 firmware.  Can be fixed by adding the hardware paths to the EMC array in: /var/stm/data/tools/monitor/disabled_instances  like this:
/storage/events/disks/default/1_0_8_0_0.1.22*
/storage/events/disks/default/0_0_8_0_0.1.16*
Then run 'monconfig' and select 'enable monitoring' to re-read the config file.

6.22.2006

trouble viewing EMC LUNs on HP-UX

On HPUX, using EMC Clariion CX700 and powerpath, if you can't see the LUNs just created by a storage administrator, then do the following:

/etc/ioscan -f
/etc/insf -eC disk
/sbin/powermt config
/sbin/powermt set policy=co
/sbin/powermt save
/sbin/powermt display dev=all


here's a very thorough version:
/etc/ioscan -f
/etc/insf -eC disk
/sbin/init.d/agent stop
/sbin/init.d/agent start
/opt/Navisphere/bin/navicli register
/sbin/powermt config
/sbin/powermt set policy=co
/sbin/powermt check
/sbin/powermt save
/sbin/powermt display dev=all


in some cases you may have to delete the /etc/powermt.custom before doing the powermt config command.....

6.21.2006

error starting stm in HPUX

HP-UX 11.00 error when starting stm:

-- Error --
The UUT status file
(/var/tmp/stm27188/servername.domain.com/data/uut_status) representing the new device map from the Unit Under Test (UUT) could not be successfully loaded into memory.  The most recent device map for the Unit Under Test (UUT) could not be built successfully.  This means operations apparently available, based on this old map, may not be, and might fail. Please refer to the Map Log and/or the System Activity Log on that system for more details.

-- Information --
Aborting all open command files.


Solution: restart diagnostic daemons:
/sbin/init.d/diagnostic stop
/sbin/init.d/diagnostic start