You can automatically forward all error report entries to your email. This next part describes how to do that.
Create a file like this:
Add this to the ODM:# cat /tmp/mailgeorge errnotify: en_name="mailgeorge" en_persistenceflg=1 en_method="errpt -a -l $1|mail -s \"errpt: $9\" george@email.com"
# odmadd /tmp/mailgeorgeNow log an entry in the error report:
# errlogger "My coffee is cold"You will see in the error report:
# errpt -a
----------------------------------------------------
LABEL: OPMSG
IDENTIFIER: AA8AB241
Date/Time: Tue Oct 6 15:57:58 CDT 2009
Sequence Number: 585
Machine Id: 0004D6EC4C00
Node Id: hostname
Class: O
Type: TEMP
Resource Name: OPERATOR
Description
OPERATOR NOTIFICATION
User Causes
ERRLOGGER COMMAND
Recommended Actions
REVIEW DETAILED DATA
Detail Data
MESSAGE FROM ERRLOGGER COMMAND
My coffee is cold
Clear the error log again (because we logged a fake test-entry in the error report):
# errclear 0Watch your email. You should receive the same error report entry in your email.
By the way, you can delete this from the ODM like this:
# odmdelete -q 'en_name=mailgeorge' -o errnotify
Topics: AIX, Performance, System Admin↑
PerfPMR
When you suspect a performance problem, PerfPMR can be run. This is a tool generally used by IBM support personal to resolve performance related issues. The download site for this tool is:
ftp://ftp.software.ibm.com/aix/tools/perftools/perfpmr
Topics: AIX, System Admin↑
Copying a logical volume
For copying a logical volume, the cplv command can be used. Using the -v flag, you can enter the name of the volume group you wish to copy to.
Once the logical volume has been copied, the trick is to get the file system in it back online:
Copy the stanza of the file system in the logical volume you copied to a new stanza in /etc/filesystems. Modify this new stanza; enter the correct jfs log, mount point and logical volume name. After this, do a fsck of your new mount point. Make sure your new mount point exists. After the fsck, you can mount the file system.
Topics: AIX, Backup & restore, System Admin↑
Restoring a mksysb of a mirrored rootvg to a non-mirrored rootvg
If you've created a mksysb of a mirrored rootvg and you wish to restore it to a system with only 1 disk in the rootvg, you can go about it as follows:
Create a new /image.data file, run:
# mkszfile -mChange the image.data file:
# vi /image.dataIn each lv_data stanza of this file, change the values of the COPIES= line by one-half (i.e. copies = 2, change to copies = 1). Also change the PPs to match the LPs as well.
Create a new mksysb, utilizing the /image.data file:
# mksysb /dev/rmt0(Do not use smit and do not run with the -i flag, both will generate a new image.data file).
Use this mksysb to restore your system on another box without mirroring.
If you wish to disable a network interface permanently, avoiding NETWORK DOWN errors in the error report:
# chdev -l en0 -a state=down -PThis command will permanently bring down the en0 interface (permanently means after reboot).
Topics: AIX, Performance, Storage, System Admin↑
Creating a large file
When you wish to create a very large file for test purposes, try this command:
# dd if=/dev/zero bs=1024 count=2097152 of=./test.large.fileThis wil create a file consisting of 2097152 blocks of 1024 bytes, which is 2GB. You can change the count value to anything you like.
Be aware of the fact, that if you wish to create files larger than 2GB, that your file system needs to be created as a "large file enabled file system", otherwise the upper file size limit is 2GB (under JFS; under JFS2 the upper limit is 64GB). Also check the ulimit values of the user-id you use to create the large file: set the file limit to -1, which is unlimited. Usually, the file limit is default set to 2097151 in /etc/security/limits, which stands for 2097151 blocks of 512 bytes = 1GB.
Another way to create a large file is:
# /usr/sbin/lmktemp ./test.large.file 2147483648This will create a file of 2147483648 bytes (which is 1024 * 2097152 = 2GB).
You can use this large file for adapter throughput testing purposes:
Write large sequential I/O test:
# cd /BIGDivide 2048/#seconds for MB/sec write speed.
# time /usr/sbin/lmktemp 2GBtestfile 2147483648
Read large sequential I/O test:
# umount /BIG(This will flush file from memory)
# mount /BIGDivide 2048/#seconds for MB/sec read speed.
# time cp 2GBtestfile /dev/null
Tip: Run nmon (select a for adapter) in another window. You will see the throughput for each adapter.
More information on JFS and JFS2 can be found here.
To measure network throughput independantly from disk I/O:
Set up an FTP connection from machine A to machine B.
binThis will transfer a file of 32K * 1024 = 32 MB. The transfer informaton will be shown by FTP.
put "|dd if=/dev/zero bs=32k count=1024" /dev/null
Topics: AIX, System Admin↑
System dump compression
Default compression of system dump isn't turned on, which may cause a lot of error report entries about your system dump devices being too small.
Check if the compression is on/off:
# sysdumpdev -lWithout compression, sysdumpdev -e will estimate the system dump size.
To turn compression on:
# sysdumpdev -CThis will reduce the required (estimated) dump size by 5-7.
To resolve a stuck printer, do the following:
Check the status of the queue:
# lpstat -W -p[queue-name]Find the pio process in use for that queue:
# ps -ef | grep pioKill that pio process:
# kill [process-number]Check the status of the queue again:
# lpstat -W -p[queue-name]Enable the queue again:
# enable [queue-name]
Topics: AIX, NIM, System Admin↑
Nim status of a client
To check on the status of a NIM client, for example, when doing a mksysb restore through NIM:
# lsnim -l hostname
Displaying results: 301 - 310.


