Category Archives: HP-UX

How can I log information about ftp accesses to a file?

1) In /etc/syslog.conf, add the line:
daemon.debug /tmp/daemon.log

2) # touch /tmp/daemon.log
# refresh -s syslogd

3) Modify your inetd.conf so that ftpd is called with the “-l” flag.
You may also want the “-d” flag. This can be done with ‘smit inetdconf’.

All the syslog messages from various system daemons should now appear in
the file “/tmp/daemon.log”.

How do I get rid of the verbose error messages?

Many of the messages from the Unix commands are available in different languages. This is controlled by the LANG environment variable, the default being En_US meaning English in the US. All the default messages have a message number associated with them, e.g.:

$ cat no-such-file

cat: 0652-050 Cannot open no-such-file.

If you prefer the terser Unix-looking error message, set your environment variable LC_MESSAGES to C, and you will get:

$ cat no-such-file

cat: Cannot open no-such-file.

By default LC_MESSAGES is the same as your environment LANG. Setting LANG does also work, but should be avoided since it changes app-defaults lookup etc. See locale(): LC_ALL

From: Bjorn P. Brox <brox@corena.n>

How to Calculating Free PE in HP-UX

Calculating free PE’s

vgdisplay -v <vgname> e.g. vg02

# vgdisplay -v vg02
— Volume groups —
VG Name                     /dev/vg02
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      1
Open LV                     1
Max PV                      16
Cur PV                      1
Act PV                      1
Max PE per PV               35004
VGDA                        2
PE Size (Mbytes)            8        —> 1 PE is  8 MB
Total PE                    17499
Alloc PE                    17400
Free PE                     99              —> free PE is 99
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0

8×99 = means 792 MB of space can be extended.

cron log is c queue max run limit reached

PROBLEM
cron jobs are being rescheduled and not running. The message in the cron log is c queue max run limit reached [date & time] rescheduling a cron job [date & time]

RESOLUTION

The error:

! c queue max run limit reached Fri May 27 12:39:00 2011
! rescheduling a cron job Fri May 27 12:39:00 2011
! c queue max run limit reached Fri May 27 12:39:00 2011
! rescheduling a cron job Fri May 27 12:39:00 2011

c queue max run limit reached [date & time]rescheduling a cron job [date & time],  corresponds to there being more than the maximum number of jobs running in the c queue than specified in “queuedefs”.

There was a problem with getspwent() which could cause the child cron processes to loop when they called getspwent().

HP-UX : 

EXAMPLE:

# cat /usr/lib/cron/queuedefs

a.4j1n
b.2j2n90w
c.100j1n

NOTE: The a queue, by default, can run 4 jobs simultaneously.

NOTE: The c.100j1n means 100 cron/at/batch jobs can be run similatenously with a nice value of 1.

To increase that number, modify the queuedefs file and restart cron.

The follow example increases the limit from 4 to 10 simultaneous jobs.

Modify the queuedefs file:

# vi /var/adm/cron/queuedefs

a.4j1n –> change this to the following line
a.10j1n

Stop Cron:

# ps -ef |grep cron

# kill {cron_pid}

NOTE: This defaults to a -15 which kills nicely.

Restart cron:

# /sbin/init.d/cron

LogicalExtentsNumber is bigger than the maximum value allowed in hp-ux

If you get this error when trying to lvextend a lvol:

lvextend: “LogicalExtentsNumber” is bigger than the maximum value allowed.

It is becuse you have tried to use more than 65,535 logical extents — the limit for a logical volume.

Your only choice is to recreate the *volume group* (‘vgcreate’) and specify a larger extent size (‘-s pe_size’). The default pe_size of four (4) is small for today’s disks and file systems as is (8).

With 8, the maximum size of a lvol is: 8 * 65535 = 524280 MB which is 8 MB shy of 512 GB.

So, if you want a lvol bigger then 512 GB, then the PE size (which can only be set at vgcreate time – can not be changed after the fact) should be 16 or 32.

HP-UX: How to Recover OS using Ignite Backup

HP-UX has its inbuilt software to backup the OS called “Ignite”. It bundled with OS installed. The easy way to make an OS backup is using tape data cartridge. Just plug the tape to tape library, and run command “make_tape_recovery -AI“.

>To restore OS using recovery tape, go to MP (management processor) and boot to tape (Sequential media) and follow the instructions.

To simplify manage the archive of OS backup, we can utilize “Ignite Server”. We can make OS backup to disk (via network) in another server (Ignite Server). The command is

“make_net_recovery -s ignite_server -x inc_entire=vg00″.

To recovery OS using ignite server (Client and Ignite server in same IP subnet):

1. Boot the failed system to Ignite server (boot lan install or boot lan.ip_ignite_server install)

2. Do not interact with ISL

3. Select “Install HP-UX” and follow the instructions to fill about server configurations (network, hostname, etc)

4. Select recovery configurations to use

If a client to use is different subnet, we must use a boot helper server. The boot helper server has same subnet with client server. To setting up boot helper:

* For example: IP Ignite server is 10.0.50.1 & GW 10.0.50.254, OS to be restored is restore01 and target client is client01 (10.0.51.1 & GW 10.0.51.254)

1. Make sure the boot helper server have Ignite software with same version with client & Ignite server

2. Point the installation to Ignite server

# instl_adm -t 10.0.50.1

3. To verify the correct configuration in boot helper, run command instl_adm -d

4. Specify the temporary ip address at boot helper that client can use to boot. Edit /etc/opt/ignite/instl_boottab

5. Copy the CINDEX & recovery directory from source (OS to be restored) to target client (server use to restore).

At Ignite Server:

# cd /var/opt/ignite/clients/restore01

# find CINDEX recovery | cpio -pvdma ../client01

# edit CINDEX file at target client (/var/opt/ignite/clients/client01/CINDEX)

– make a full path for system_cfg, control_cfg & archive_cfg. (/var/opt/ignite/clients/client01/../…..)

6. Boot to boot helper or direct to ignite server

* refer to step mentioned above.