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

6.17.2006

create vmware .vmx virtual machines

Create virtual machines for VMware Player online and free - easyvmx http://www.easyvmx.com/

6.16.2006

comments in password file

In HP-UX, comments can be used in the password file, although I don't think anyone would recommend it. It may be in violation of SOX requirements as well; be careful. That having been said, I've found the following when using comments in the passwd file of HPUX (very well may apply to other *nix flavors):

3 requirements:
* 7 total fields - exactly 6 colons must be in every line
* uid must be numeric or valid
* gid must be numeric or valid

You should check your /etc/passwd file using the pwck command if you are in doubt of the integrity of the file.

Some symptoms to look out for if your password file is screwed up:
$ /bin/su - user123
su: Unknown id: user123

$ passwd
Invalid login name.

The password file is read from top to bottom, so if one account works, but others don't check the location of the comment/bad entries and where they relate in position to the account in question.

6.07.2006

verify OV agent status

verify your OpenView (OV) agent is working properly:
opcagt -status

5.31.2006

Get Phyisical RAM on HP-UX

in HPUX to get the phyisical / real memory, you can do one of the following:

grep Physical /var/adm/syslog/syslog.log


5.30.2006

Replacing a Mirrored HP-UX Boot Disk

Replacing a Mirrored HPUX Boot Disk


Reduce any logical volumes that have mirror copies on the faulty disk so that they no longer mirror onto that disk. (note: lvdisplay -v /dev/vgXX/lvol* will show the lvols)

# lvreduce -m 0 /dev/vgXX/lvolX /dev/dsk/cXtXd0 (for 1 way mirroring)

Reduce the volume group.

# vgreduce /dev/vgXX /dev/dsk/cXtXd0

Stop I/O's going to drive

# pvchange -a n /dev/dsk/c0t2d0


---> Replace the drive.


# pvchange -a y /dev/dsk/c0t2d0

Initialize the disk for LVM.

# pvcreate -f –B /dev/rdsk/cXtXd0

Set boot switch for no quorum and add offline diagnostics (if available to drive)

# mkboot –a "boot vmunix –lq" /dev/dsk/c0t2d0

# mkboot –b /usr/sbin/diag/lif/updatediaglif2 –p ISL –p HPUX –p LABEL –p AUTO /dev/rdsk/cXXtXd0.

Extend the volume group.

# vgextend /dev/vgXX /dev/cXtXd0

Lvextend the mirrors back onto the replaced drive.

# lvextend -m 1 /dev/vgXX/lvolX /dev/dsk/cXtXd0 & (for 1 way mirroring) Do this for each lvol on the system. The & allows you to run the task in the background. You can check on the progress using the lvdisplay –v /dev/vg00/lvolXX.

After running the mkboot and lvextend commands, do an lvlnboot -Rv to relink the disk into the

Boot Data Reserved Area of all the physical volumes in the volume group.

# lvlnboot -Rv


5.29.2006

allowing backspace and @ in login prompt on HPUX

The backspace, @ (at sign), and # (pound character) don't work at the login prompt on HPUX systems. In HP-UX the default kill and erase values are set to @ and # respectively, you can change them via /dev/ttyconf by creating a custom startup script. See the following ITRC threads and the section labeled "Control Character Default Assignments" on the man page for stty: http://docs.hp.com/en/B2355-60127/stty.1.html

See termio(7) for the default values of control characters: http://docs.hp.com/en/B2355-60127/termio.7.html

like this: stty erase ^H kill ^U intr ^C susp ^Z < /dev/ttyconf

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=430766
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=181001