Tech Blog

These are blog entries written by the UNIX Health Check development team. Our team has extensive technical experience on both AIX and Red Hat systems, and we like to share our knowledge with our visitors.

Topics: AIX, System Admin

Find: 0652-018 An expression term lacks a required parameter

If you get this error, you probably have one of the following things wrong:

  • You've forgotten the slash and semicolon in the find command. Use find command like this:
    # find /tmp -mtime +5 -type f -exec rm {} \;
  • If you get this error from crontab, then you should add an extra slash to the slash and semicolon. Use the find command like this:
    0 2 * * * find /tmp -mtime +5 -type f -exec rm {} \\;

Topics: AIX, Backup & restore, System Admin

Cloning a system using mksysb

If you wish to clone a system with a mksysb, then you can do so, but you do not want your cloned system to come up with the same TCP/IP information. Just issue rmtcpip before creating the mksysb, and you have a perfect image for cloning to another system. Be sure to issue this command at a terminal, as you will lose your network connection!

Topics: AIX, Performance, System Admin

Keeping a processor busy

There are times that you would like to create some "load" on the system. A very, very easy way of keeping a processor very busy is:

# yes > /dev/null
The yes command will continiously echo "yes" to /dev/null. This is a single-threaded process, so it will put load on a single processor. If you wish to put load on multiple processors, why not run yes a couple of times?

Topics: AIX, Monitoring, System Admin

Cec Monitor

To monitor all lpars within 1 frame, use:

# topas -C

Topics: AIX, SSA, Storage, System Admin

Renaming pdisks

If, for some reason, the pdisk and hdisk numbering of SSA disks is not sequential anymore, then there's a way to bring order in to chaos. Usually, the pdisk and hdisk numbering order are screwed up when you replace multiple disks together. Especially on HACMP clusters, a correct numbering of pdisks and hdisks on all nodes of the cluster, comes in handy.

Unmount all file systems on the specific disks, then varyoff the volume group:

# /usr/lib/methods/cfgssar -l ssar
If this doesn't help (it sometimes will), then renumber the disks manually:

Write down the pdisk names, hdisk names, location of the disks in the SSA drawer and the connection ID's of the disks. You can use lsdev -Cc pdisk to show you all the pdisks and the drawer and location codes. Use lsdev -Clpdiskx -Fconnwhere to show the connection ID of a pdisk. Then, figure out, how you want all disks numbered.

Remove the pdisks and hdisks with the rmdev -dl command.
Create the pdisks again:
# mkdev -p ssar -t scsd -c pdisk -s ssar -w [connection-ID] -l pdisk1
Create the hdisks again:
# mkdev -p ssar -t hdisk -c disk -s ssar -w [connection-ID] -l hdisk3
Test with:
# ssaxlate -l pdisk1
if it shows hdisk3 (Usually the hdisk number is 2 higher than the pdisk number if you use 2 SCSI disks in the rootvg).

If you've done all disks this way, check with lsdev -Cc pdisk. If you're happy, then varyon the volume group again and mount all filesystems.

Topics: AIX, Backup & restore, System Admin

/dev/ipldevice gone?

Sometimes, when you create an mksysb, you receive an error like this one:

/dev/ipldevice not found
Device /dev/ipldevice is a hard link to the disk your system booted from. Mksysb tries to determine the size of the boot logical volume with the bosboot -qad /dev/ipldevice command. Via lslv -m hd5 you can see from which disk was booted (or via bootlist -m normal -o).

To resolve this problem: re-create the hard link yourself:
# ln /dev/bootdevice /dev/ipldevice
For example:
ln /dev/rhdisk0 /dev/ipldevice
Note: Use "rhdisk" and not "hdisk".

Another way to solve this problem: reboot your system and the /dev/ipldevice will be created automatically for you (Your users may prefer the first solution...).

Topics: AIX, System Admin

Processor speed and more system information

To quickly show you the processor speed, cpu type, amount of memory and other system information, type:

# lsconf
You can also use prtconf.

Topics: AIX

Word wrapping files

If the lines in your text file are too long, you may want to word wrap them. In AIX this command is called fold:

# fold -sw 72 longfile > shortfile
This command will keep the longest line up to 72 characters and will not break a word in half. Without -w 72 lines will be wrapped to 80 characters.

Topics: AIX, Storage, System Admin

Using a DVD-RAM as a regular file system

To use a DVD-RAM for writing and reading like a file system, use the following commands. This will work only at AIX 5.2 and above:

  • Put a DVD-RAM into the drive
    # udfcreate -d /dev/cd0
  • Mount the DVD-RAM:
    # mount -V udfs /dev/cd0 /mnt
    If you get an error, ensure /etc/vfs contains this line (and retry the mount command after validating):
    udfs 34 /sbin/helpers/udfmnthelp
Then use this as a regular filesystem.

Topics: AIX, Backup & restore, System Admin

DVD-RAM Backup

You can use a DVD-RAM to create a system backup. To do so, enter:

# smitty mkdvd
This works in AIX 5.2 and above.

Number of results found for topic AIX: 231.
Displaying results: 161 - 170.