If 'u like UNIX taste... try HP-UX. Interesting tips&tricks on HP-UX

lunes, enero 23, 2006


How to Enable Asynchronous I/O Disk HP-UX 11.11


Do you want to use async I/O with your Oracle, Sybase ... etc ...

Quite simple...

a) From the SAM Kernel configuration menu, choose Drivers and set
the Pending State for asyncdisk to In.

b) From the Actions Menu rebuild the Kernel

c) At the Unix Prompt , execute the following statements as 'root'
# insf

you must have in your /dev

crw-rw-rw- 1 bin bin 101 0x000000 Jan 23 12:41 /dev/async
crw-rw-rw- 1 bin bin 101 0x000000 Jan 23 12:41 /dev/asyncdsk

if u don't have try:

#insf -e

...simple not??

Another way is doing manually... not dificult... supose you are doing it for oracle:

1. cd /stand/build

2. /usr/lbin/sysadm/system_prep -s system

3. vi /stand/build/system - add the following 2 lines: asyncdsk & asyncdsk_included

4. mk_kernel -s /stand/build/system

5. cp /stand/system /stand/system.prev

6. cp /stand/build/system /stand

7. kmupdate /stand/build/vmunix_test

8. cd /

9. shutdown -r -y now

10. after the system is reboot..

11. Use sam to change the value of the parameter max_async_port from 50 -> 1024 (static, you need reboot)

12. check that the driver is installed: lsdev | grep 101

101 -1 asyncdsk pseudo


13. mknod /dev/async c 101 0x000000

14. chown oracle:dba /dev/async (the special are created with crw-rw-rw- so you don't need perform that... it's your choice...)

15. chmod 660 /dev/async

16. vi /etc/privgroup - add 1 line:
dba MLOCK

17. run the command: setprivgrp -f /etc/privgroup

18. run the command: getprivgrp, and make sure that you can the following
output:

global prvileges: CHOWN
dba: MLOCK


19. make sure that the oracle team add the following parameter to the oracle
init files:

disk_asynch_io=true

Finaly you do rigth doing a little tests like...

*It's your driver reali loaded???
# kmadmin -k | grep async
asyncdsk_included
asyncdsk


*Are your privgroups directives correctly established a boot???

# grep /etc/privgroup /sbin/init.d/*
/sbin/init.d/set_prvgrp: if [ -f /etc/privgroup ]; then
/sbin/init.d/set_prvgrp: /usr/sbin/setprivgrp -f /etc/privgroup

sábado, octubre 15, 2005


Kernel not Relocatable - VPAR - Ignite


If you are doing something like...

vparcreate -p <name> /
-a cpu::<x> /
-a cpu:::<x>:<x> /
-a cpu:0.10 -a cpu:<xx.yy> /
-a mem::<nnnn> /
-a io:<n.n.n...> /
-a io:<n.n.n...> /
-a io:<n.n.n...>
-a io:<n.n.n...>:boot

...and you get an error similar to...


[MON] Booting
Kernel file is not relocatable
File address is 0x0000000000020000 and memory address is 0x0000000004000000
Error reading program segments
Failed to load (n.n.n.n.....)/stand/vmunix


...when you're trying to install S.O. cloning another machine from Ignite, in my own experience is because the originar server copied with Ignite is not a vpar system, the problem is simply that the original soft doesn't have vpar software installed or the one installed is a previous version, so in order to load the O.S. you must:


-Create a depot with your os and vpar soft...



make_depots -r <version ??B.11.11??> -s <source> (/dev/cdrom)
make_depots -r <version ??B.11.11??> -a <700/800> -s <source> (/dev/cdrom)


-Create the ignite configuration...

make_config -r <version ??B.11.11??>


-Update ignite index...

manage_index -a -f /var/opt/ignite/data/Rel_B.11.11/apps_800_cfg


-Load ignite text or graphic...


/opt/ignite/bin/ignite
or
export DISPLAY=<ip.client>:<x.y>
/opt/ignite/bin/ignite &


-You need to modify configuration...


Menu Options
Server Configuration
Server Options
Default configuration: HP-UX B.11.11 Default
Client Timeouts: <nn>
Run clients installation UI on: server

Menu Options
Server Configuration
Session Options
Mark:
Confirm new clients
Show the welcome screen for the install server
Unmark (if'u want)
Halt the client after installation


-Start vpar os install from ignite server

vparboot -p <name> -I <ip.server.ignite>,/opt/ignite/boot/WINSTALL

Of course I supose you complain all network requirements... like broadcast enable in your vlan, dhcp server if you want... etc...

Timestamp .sh_history


Do you want timestamp or ip-sign every .sh_history entry ??

Try this... simply fantastic....:

trap 'date "+# %c" | read -s' debug

or...

trap 'who am i -R | read -s' debug

...you can try any other command you imagine to sign your history

domingo, octubre 09, 2005


Rock Ridge extensions ... pfs_mount?


Do you have problems mounting Oracle cd? or perhaps a Windows burned one?
There is the minimal needed steps to mount a RickRidge CD on HP-UX 11i and how to export it to other machine:

In the system where you've the CD do the next:
0.- mysystem:/#mkdir -p /mnt/pfs_cdrom (use your own)
1.- mysystem:/#nohup /usr/sbin/pfs_mountd &
2.- mysystem:/#nohup /usr/sbin/pfsd &
3.- Add the filesystem to /etc/pfs_fstab:
Sample: /dev/dsk/cXtYdZ /mnt/pfs_cdrom pfs-rrip xlat=unix 0
3.1.- As is not usual mount Rock Ridge CD i prefer do it manually and not in pfs_fstab
4.- If you want export to other system perform steps 5 & 6 if not, go to 7.
5.- Put the rigth entry to your filesystem in the /etc/pfs_exports (man pfs_exports(5))
6.- mysystem:/#pfs_exportfs -av
7.- mysystem:/#pfs_mount /mnt/pfs_cdrom

Now is the moment to mount in our remote system, so you must perform a few steps:

0.- remotesystem:/#mkdir -p /mnt/pfs_cdrom (use your own)
1.- remotesystem:/#nohup /usr/sbin/pfs_mountd &
2.- remotesystem:/#nohup /usr/sbin/pfsd &
3.- remotesystem:/#pfs_mount -o xlat=unix,rrip mysystem:/mnt/pfs_cdrom /mnt/pfs_cdrom

jueves, octubre 06, 2005


Classic problem.... Root Lost Password... ;)


This is an easy question... but... what if your system is trusted mode???

Don't be afraid, there is no problem, this is the official procedure but not only... you can use some steps of this procedure if you want re-stablish a password than can not be set by ciclic problems...

The steps to reactivate the root account:

1. Boot the system in to single user mode.

2. Mount /usr file systems.
# mount /usr

Note: The file system might need file system check (fsck) before mounting.

3. Systems that are not using Trusted System security skip to step #4.
For Trusted Systems (presence of a /tcb directory), follow these additional
steps:

a) Use the following command to reactivate the 'root' account:
# /usr/lbin/modprpw -k root

b) Use the 'modprpw' command to null the password, so that the passwd command
does not prompt for the old password.

10.x
# /usr/lbin/modprpw -w "" root

11.x
# /usr/sam/lbin/usermod.sam -F -p "" root

NOTE: To untrust the system, use: tsconvert -r

4. Change the root account password.
# passwd root

5. Boot the system in to multi user mode.


Tanx & refs:

ITRC

viernes, febrero 25, 2005


What's on iCOD...


Hewlett-Packard's Instant Capacity On Demand (iCOD) is program designed for customers that owns a HP 9000 enterprise server and provides the ability to access to additional CPU resources beyond the amount that was purchased. As HP defines it:
... provides you with the ability to activate additional CPU power for unexpected growth and unexpected spikes in workloads...

In fact, HP 9000 systems called iCOD systems, had more cpu's than customer purchased, these are the iCOD CPUs. These CPUs belongs to HP and the customer paid for a nominal "Right-To-Access Fee". This rigth allows customer to activate any number of iCOD CPUs in any time, transforming them in a ordered CPUs, this operation is considered an upgrade for the HP 9000.

But this isn't the only advantage of iCOD, because it is possible too have this CPU's activated by a limited amount of time, in example the customer can have one or more cpu active only three days a month, or all monday nigths, or any other combination. This program is a evolution of iCOD and is called TiCOD: Temporary Instant Capacity On Demand".

I think is a really insteresting option, and if you want more detailed information, you can get it publically available from:

http://docs.hp.com/en/B9073-90012/index.html

viernes, enero 14, 2005


Create HP-UX Depot


What happens if you try to download some patchs recommended for Java 1.4 on HP-UX 11i, but when you got the zip or tar file the script "create_depot_hp-ux_11" is not included. Lot of people 've had this dissapointing experience. But it's easy to create this by yourself

Try it...

Copy the patches to a directory (/tmp/patch)
#cd /tmp/patch
#tar xvf file.tar
#for i in PH*
>do
>sh $i
>done


All your patches are unshared now

#mkdir depot
#for i in PH*.depot
>do
>swcopy -s ${PWD}/$i \* @ /tmp/patch/depot
>done


Ok you had a new depot so install it...

# swinstall -s /tmp/patch/depot

Ref:http://itrc.hp.com