Wednesday, March 25, 2009

AIX - Tips and Tricks - Part V

1. How to force a failover of an EtherChannel ?
# /usr/lib/methods/ethchan_config -f Etherchannel_Device

2. How to add a backup adapter to an existing etherchannel device ?
# /usr/lib/methods/ethchan_config -a -b Etherchannel_Device Ethernet_Adapter

3. How to change the address to ping attribute of an EtherChannel ?
# /usr/lib/methods/ethchan_config -c Etherchannel_Device netaddr New_Ping_IP_Addr

4. How to list the available major numbers in a system ?
# lvlstmajor

5. How to list the major number of a volume group ?
# lvgenmajor rootvg

6. Consider a situation where you have a VG in a PV. But you have not imported that.
Now you need to find a list of attributes of that volume group before importing/varyon it.
Answer the below questions :

a. How to list the maximum number of logical volumes allowed in the VG ?
# lqueryvg -p PVname -N

b. How to show the PP size ?
# lqueryvg -p PVname -s

c. How to show the number of free PPs in the VG ?
# lqueryvg -p PVname -F

d. How to show the current number of LVs in the VG ?
# lqueryvg -p PVname -n

e. How to list the current number of PVs in the VG ?
# lqueryvg -p PVname -c

f. How to list the total number of VGDAs for the VG ?
# lqueryvg -p PVname -D

g. How to list each LVID, LV name, state for each logical volume ?
# lqueryvg -p PVname -l

h. How to list each PVID, number of VGDAs and state for each PV in the VG ?
# lqueryvg -p PVname -P

i. How to list all the attributes with tags for the vG ?
# lqueryvg -p PVname -At

j. How to list the VGID from that physical volume ?
# lqueryvg -p PVname -v

7. How do you move a physical partition ( actually its just a data between PPs) ?
# lmigratepp -g VGID -p old_PVID -n old_PPNum -P new_PVID -N new_PPNum

8. How to retrive the VG name for a particular LV from ODM ?
# getlvodm -b LVID

9. How to retrive all configured PVs from ODM ?
# getlvodm -C

10. How to retrive the major number for a VGID from ODM ?
# getlvodm -d VGID

11. How to retrive the logical volume allocation characteristics for a LVID from ODM ?
# getlvodm -c LVID

12. How to retrive the free configured PVs from ODM ?
# getlvodm -F

13. How to retrive the strip size for a LVID from ODM ?
# getlvodm -F LVID

14. How to retrive the PV name for a PVID from ODM ?
# getlvodm -g PVID

15. How to retrive all VG names from the ODM ?
# getlvodm -h

16. How to retrive the VGID for a PVID from ODM ?
# getlvodm -j PVID

17. How to retrive the LVs and LVIDs for a VG name or VGID from ODM ?
# getlvodm -L VGDescriptor

18. How to retrive the LVID/LV Name for a LV Name or LVID from ODM ?
# getlvodm -l LVDescriptor

19. How to retrive the mount point for a LVID from ODM ?
# getlvodm -m LVID

20. How to retrive the stripe width for a LVID from ODM ?
# getlvodm -N LVID

21. How to retrive the PVID/PN name for a PV name or PVID from ODM ?
# getlvodm -p PVDesciptor

22. How to retrive the PV names, PVIDs and VGs of all configured PVs from ODM ?
# getlvodm -P

23. How to retrive the relocatable flag for a LVID from ODM ?
# getlvodm -r LVID

24. How to retrive the VG state for a VG from ODM ?
# getlvodm -s VGDescriptor

25. How to retrive the timestamp for a VG from ODM ?
# getlvodm -T VGDescriptor

26. How to retrive the VG name for a VGID from ODM ?
# getlvodm -t VGID

27. How to retrive the auto-on value for a VG name or VGID from ODM ?
# getlvodm -v VGDesciptor

28. How to retrive the VGID for a vG name ?
# getlvodm -v VGDesciptor

29. How to retrive the PV names and PVIDs for a VG from ODM ?
# getlvodm -w VGDesciptor

30. How to retrive the LV type ffor a LVID from ODM ?
# getlvodm -y LVID

31. How to retrive the concurrent capable flag for a VG from ODM ?
# getlvodm -X VGDescriptor

32. How to retrive the auto-on concurrent flag for a VG from ODM ?
# getlvodm -x VGDescriptor

33. How to display the contents of LVCB ?
# getlvcb -A LVName

34. How to list the number of copies of a LV from LVCB ?
# getlvcb -c LVName

35. How to list the file system name of a LV from LVCB ?
# getlvcb -f LVName

36. How to list the label of a LV from LVCB ?
# getlvcb -L LVName

37. How to display the type of the file system from LVCB ?
# getlvcb -t LVName

38. How to display the upper limit from LVCB ?
# getlvcb -u LVName

39. How to list the current defrag state of a file system ?
# defrag -q Filesystem

40. How to lsit the current and future (if degragmented) state of a file system ?
# degrag -r Filesystem

41. How to defragment a file system ?
# defrag Filesystem

42. How to run fsck on 2 filesystems simultaneously on different drives ?
# dfsck FileSystem1 FileSystem2

43. How to list the superblock, i-name map, disk map information for a file system ?
# dumpfs Filesystem

44. Where is the magic file located ?
/etc/magic

45. How do you remove a file system data from /etc/filesystems ?
# imfs -x -l LVName

46. How do you list inode, last update/modify/access timestamp of a file ?
# istat FileName

47. How do you update the i-node table and write buffered files to the hard disk ?
# sync

48. How do you list the filesystems in a volume group ?
# lsvgfs VGName

49. How do you redefine the set of PVs of a VG in the ODM ?
# redefinevg -d PVName VGName

50. How do you replace a PV in a VG ?
# replacepv SourcePV DestinationPV

Monday, March 23, 2009

HMC Tips VI - Reference Code

1. To list the current reference code for the managed system :

# lsrefcode -r sys -m Managed-System

2. To list last 10 reference codes for the managed system :

# lsrefcode -r sys -m Managed-System -n 10 

3. To list the reference code (Its called as LED in old pSeries servers) for each partition in the managed system :

# lsrefcode -r lpar -m Managed-System -F lpar_name,time_stamp,refcode

4. To list last 25 reference codes (led) for partitions lpar-a and lpar-b :

# lsrefcode -r lpar -m Managed-System -n 25 --filter ""lpar_names=lpar-a,lpar-b""

HMC Tips V - DLPAR Operations

To list the memory by system level :
# lshwres -r mem -m Managed-System --level sys

To list the memory by lpar level :
# lshwres -r mem -m Managed-System --level lpar

To list the processor / processing units by system level :
# lshwres -r proc -m Managed-System --level sys

To list the processor / processing units by lpar level :
# lshwres -r proc -m Managed-System --level lpar

To list the processor / processing units by pool level :
# lshwres -r proc -m Managed-System --level pool

To add 1GB of memory to an lpar dynamically :
# chhwres -r mem -m Managed-System -o a -p Lpar_name -q 1024

To remove 1GB of memory to an lpar dynamically :
# chhwres -r mem -m Managed-System -o r -p Lpar_name -q 1024

To move 1GB of memory from lpar_a to lpar_b dynamically :
# chhwres -r mem -m Managed-System -o m -p Lpar_a_name -t Lpar_b_name -q 1024

To add 1 dedicated cpu to an lpar dynamically :
# chhwres -r proc -m Managed-System -o a -p Lpar_name -procs 1

To remove 1 dedicated cpu to an lpar dynamically :
# chhwres -r proc -m Managed-System -o r -p Lpar_name -procs 1

To move 1 dedicated cpu from lpar_a to lpar_b dynamically :
# chhwres -r proc -m Managed-System -o m -p Lpar_a_name -t Lpar_b_name -procs 1

To add 0.5 processing unit to an lpar dynamically :
# chhwres -r proc -m Managed-System -o a -p Lpar_name -procunits 0.5

To remove 0.5 processing unit to an lpar dynamically :
# chhwres -r proc -m managed-System -o r -p lpar_name -procunits 0.5

To move 0.5 processing unit from lpar_a to lpar_b dynamically :
# chhwres -r proc -m managed-System -o m -p lpar_a_name -t lpar_b_name -procunits 0.5

To restore memory resources on a lpar based on its profile :
# rsthwres -r mem -m managed-System -p Lpar_name

To restore memory resources for all partitions in a managed system :
# rsthwres -r mem -m managed-System

To restore processing resources on a lpar based on its profile :
# rsthwres -r proc -m managed-System -p lpar_name

To restore processing resources for all partitions in a managed system :
# rsthwres -r proc -m managed-System

To restore physical I/O slots on a lpar based on its profile :
# rsthwres -r io -m managed-System -p lpar_name

To restore physical I/O slots for all partitions in a managed system :
# rsthwres -r io -m Managed-System


--- Rest In The Next Post ---

Saturday, March 21, 2009

HMC Tips IV - Backup

1. To backup HMC data on DVD :

# bkconsdata -r dvd 

2. To backup HMC data to a ftp server :

# bkconsdata -r ftp -h ftp_server_name -u ftp_username --passwd ftp_password

3. To backup HMC data to a NFS mounted file system :

# bkconsdata -r nfs -n nfs_server_name -l Nfs_mount_point

4. To list storage media devices :

# lsmediadev

5. To backup profile data for a managed system :

# bkprofdata -m Managed-System -f File_name

Profile data files are kept under /var/hsc/profiles/Managed-Machine-Serial-Number

6. To restore a managed profile data :

# rstprofdata -m Managed-System -l restore_type -f File-Name

Valid restore types are

1 - Full restore from the backup file.
2 - Merge the current profile data and backup profile data, with priority to backup.
3 - Merge the current profile data and backup profile data, with priority to current data.
4 - Initialize the profile data. All partition, partition/system profiles will be deleted.

Friday, March 20, 2009

HMC Tips III - User Management

To list all users in a HMC
# lshmcusr

To list only user names and managed resource roles for all HMC users :
# lshmcusr -F name:resourcerole

To create a user :
# mkhmcusr -u User_Id -a ROLE -d DESCRIPTION --passwd PASSWORD -M PASSWD_EXPIRATION_DAYS

To remove a user :
# rmhmcusr -u USER_NAME

To change an hmc user's password :
# chhmcusr -u User_Name -t passwd -v New_Password

To change the task role for the user "user1" to hmcoperator :
# chhmcusr -r user1 -t taskrole -v hmcoperator

Some other task roles ->
hmcsuperadmin, hmcoperator, hmcviewer, hmcpe, hmcservicerep or a user defined task role

To list all managed resource objects :
# lsaccfg -t resource

To list all managed resource roles :
# lsaccfg -t resourcerole

To create a task role using a config file :
# mkaccfg -t resourcerole -f /tmp/fil1

To create a task role :
# mkaccfg -t taskrole -i "name=tr1,parent=hmcsuperadmin,"resources=cec:chcod+lscod+lshwres,lpar:chssyscfg+lssyscfg+mksyscfg""

To change a task role :
# chaccfg -t taskrole -i "name=tr1,"resources=cec:chhwres+chsysstate,lpar:chssyscfg+chled+chhwres""

To remove a task role :
# rmaccfg -t taskrole -n tr1

HMC Tips II - Partitions and Profiles

1. To list all machines configured in a hmc

# lssyscfg -r sys

2. To list all lpars(partitions) in a power machine

# lssyscfg -r lpar -m Managed_System

3. To activate/start an LPAR :

# chsysstate -r lpar -m Managed_System -o on -n LPAR_Name -f Profile_ name

4. To deactivate/shutdown an LPAR :

# chsysstate -r lpar -m Managed_System -o shutdown --immed -n LPAR_Name

5. To open the console of a partition :

# mkvterm -m Managed_System -p LPAR_Name

6. To close the console of a partition:

# rmvterm -m Managed_System -p LPAR_Name

7. To list the profile of a partition:

# lssyscfg -r prof -m Managed_System --filter "lpar_names=LPAR_Name,profile_names=Profile_Name"

8. To change the min/desired/maximum memory settings of a partition profile :

# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,min_mem=512,desired_mem=19456,max_mem=20480"

9. To change the min/desired/maximum processor units of a partition profile :

# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,min_proc_units=0.2,desired_proc_units=0.5,max_proc_units=2.0"

10. To change the min/desired/maximum virtual processor of a partition profile :

# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,min_procs=1,desired_procs=2,max_procs=6"

11. To change capped/uncapped setting in a partition profile :
# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,sharing_mode=uncap,uncap_weight=128"

Possible values for sharing_mode are cap and uncap.
Possible values for uncap_weight are from 0 to 128.

12. To change the name of a partition profile :

# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,new_name=New_Profile_Name"

13. To change the name of a partition :

# chsyscfg -r lpar -m Managed_System -i "name=LPAR_Name,new_name=New_LPAR_Name"

14. To change the default profile of a partition :

# chsyscfg -r lpar -m Managed_System -i "name=LPAR_Name,default_profile=Partition_Profile_Name"

15. To set "power off the machine after all partitions are shutdown" for a power machine :

# chsysscfg -r sys -m Managed_System -i "power_off_policy=0"

Possible values are

0 -> Power off after all partitions are shutdown
1 -> Do not power off after all partitions are shutdown

16. To rename a system profile :

# chsyscfg -r sysprof -m Managed_System -i "name=Sys_Prof_Name,new_name=New_Sys_Prof_Name"

17. To add 2 more partition profiles to a system profile :

# chsyscfg -r sysprof -m Managed_System -i "name=,"lpar_names+=partition3,partition4",
"profile_names+=profile3,profile4""


--- Rest in the next ---

HMC Tips I - HMC and Managed System

To enable ssh in a hmc :

# chhmc -c ssh -s enable
You can disable it by replacing the word 'enable' with 'disable'

To enable xntp in a hmc :

# chhmc -c xntp -s enable
You can disable it by replacing the word 'enable' with 'disable'

To add an entry in the syslog config file :

# chhmc -c syslog -s add -a IP_Addr ( or '-h host_name' )
You can remove an entry by replacing the word 'add' with 'remove'

To add an entry in the ntp config file :

# chhmc -c xntp -s add -a IP_Addr ( or 'h host_name' )
You can remove an entry by replacing the word 'add' with 'remove'

To configure the network as a startup device :

# chhmc -c netboot -s enable
You can disable it by replacing the word 'enable' with 'disable'

To permit IP addresses from utilizing HMC services :

# chhmc -s ssh ( or any_service) -s add -a IP_Addr
You can remove an entry by replacing the word 'add' with 'remove'

To add a DNC_server or domain_suffix :

# chhmc -c network -s add [-ns DNS_Server] [-ds domain_suffix ]
You can remove an entry by replacing the word 'add' with 'remove'

To change network settings for a specific network interface :

# chhmc -c network -s modify -i interface_name
[-a IP_Addr] [-nm network_mask] [ --lparcomm on|off]
Note: Network settings for the s10 interface cannot be changed.

To change other network settings :

# chhmc -c network -s modify
[-h hostname] [-d network-domain-name]
[-g gateway]

To change the locale for the HMC :

# chhmc -c locale -s modify -l locale

To change the HMC date and time, time zone :

# chhmc -c date -s modify
[ --datetime ]
[ --clock {local | utc} ]
[ --timezone {time-zone | none} ]

To list the BIOS Level of the HMC :


# lshmc -b
To list the current locale :

# lshmc -l

To list all of the locales supported by HMC :

# lshmc -L

To list network settings :

# lshmc -n

To list remote access settings :

# lshmc -r

To list VPD information :


# lshmc -v

To list version information :


# lshmc -V

To display IP connections to SP's and Bulk Power Controllers :

# lssysconn -r all

To list all machines configured in a hmc

# lssyscfg -r sys

To power on a managed system :

# chsysstate -r sys -m managed_system-o on -f SYS_PROF_NAME

To power on a managed system in standby mode :

# chsysstate -r sys -m managed_system -o onstandby -f sys_profile_name

To power off a managed system :

# chsysstate -r sys -m managed_system -o off --immed

To restart a managed system :

# chsysstate -r sys -m managed_system -o off --immed --restart

To recover partition data for a managed system :


# chsysstate -r sys -m managed_system -o recover

To initiate service processor failover for a managed system :


# chsysstate -r sys -m managed_system -o spfailover

To validate or activate a system profile :


# chsysstate -r sysprof -m managed_system -n sys_profile_name --test

To change the password of a managed system :


# chsyspwd -t {access | admin | general} -m managed_system --passwd current_password --newpassword new_password

Saturday, March 7, 2009

AIX - Tips and Tricks - Part IV

AIX Tips 'n' Tricks - Part IV

1. How to list IDE controllers in your system ?

lscfg -l ide*

Sample Output:

DEVICE LOCATION DESCRIPTION
ide0 01-00-00 ATA/IDE Controller Device
ide1 01-00-01 ATA/IDE Controller Device

It shows
Controller ide0 and ide1 are located on the system planar
(Notice 1st and 2nd digits in location code).
The planar indicator is the second digit in the location value with a value of 1.
6th digit indicates the controller number.

2. After a successful login, the login command displays the message of the day, the date and time of the last successful and unsuccessful login attempts for this user, and the total number of unsuccessful login attempts for this user since the last change of authentication information (usually a password).

How to supress these messages?

You can supress these messages by creating a .hushlogin file in your home directory.

At the prompt in your home directory, type the following:
# touch .hushlogin

The touch command creates the empty file named .hushlogin if it does not already exist. The next time you log in, all login messages will be suppressed. You can instruct the system to retain only the message of the day, while suppressing other login messages.

3. What are the files, system reads when you logon ?

First File : /etc/environment - contains variables specifying the basic environment for all processes.

Second File: /etc/profile - controls system-wide default variables

Third File : $HOME/.profile - lets you customize your individual working environment

Fourth File: $HOME/.env - lets you customize your individual working environment variables.


4. How to override variables defined in /etc/environment for a particular user?

A fourth file that the operating system uses at every user logon is the
$HOME/.env file, if your .profile contains the following line: export
ENV=$HOME/.env The .env file lets you customize your individual
working environment variables.

The .env file contains the individual user environment variables that override the variables set in the /etc/environment file. You can customize your environment variables as desired by modifying your .env file.

5. How to change the font in AIX ?

To change the font to an italic, roman, and bold face of the same size, type the following:

# chfont -n /usr/lpp/fonts/It114.snf /usr/lpp/fonts/Bld14.snf /usr/lpp/
fonts/Rom14.snf

You can also use smitty chfont.

6. How to run a process in the background ?

For Ex, to run script1.sh in background run

# script1.sh & -> But this script process gets killed if you close the terminal

So always run, # nohup script1.sh &

Usage of nohup doesn't kill the process if you close the telnet session.
Output from the process/script will be stored in a file called nohup.out in the directory from where you started the process.

So if you want to start backup using mksysb and close your terminal wihle leaving leaving office, you can safely use "nohup command &".

Next day morning, you can view the contents of nohup.out to know the status of the backup job.

7. Whats the default priority for a process?

Default priority is 0. Priority numbers is in the range of -20 to 20.
Highest number is the lowest priority and lowest number has hight priority.

To set the priority while start a process, use nice command.
If the process is already running, you can use "renice" command to change its priority.

8. How to stop, resume a process and to make it foreground process?

To stop(pause) a foreground process, use Cntrol + Z keys ie., Ctrl+Z.

Note: Ctrl+Z works in the Korn shell (ksh) and C shell (csh), but not in the Bourne shell (bsh). To restart a stopped process, you must either be the user who started the process or have root user authority.

To restart a stopped process, enter
# kill -19 pid

To run it in foreground, enter
# fg pid

where pid is the procedd id which can be obtained from "ps -ef | grep process_name"

9. How to display a program output as well as copying to a file ?

Normally usage of output redirection supresses the output on screen.
Ex. ls -l > file1

If we want to redirect the output as well as show the output in screen use the tee command.

Ex: ls -l | tee -a file1

10. How to capture the terminal screen to a file ?

To capture the screen of a terminal, at the prompt, type the following:

#script

The system displays information similar to the following:

Script command is started. The file is typescript.

Everything displayed on the screen is now copied to the "typescript" file.

To stop the script command, press Ctrl-D or type exit and press Enter.

The system displays information similar to the following:

^D
Script command is complete. The file is typescript.

Use the cat command to display the contents of your file.

11. How to number all lines in a file ?

# n1 -ba file1.txt

This will display all lines of file1.txt alongwith their line number.

12. What are the supported file systems in AIX ?

a) JFS (or) JFS2 - Disk based file system
b) NFS - Network based File system
c) CDRFS - CDROM based file system
d) UDFS - DVD-ROM based file system
e) RAMFS - RAM based file system used while booting the system

13. What are the different directory abbreviations ?

Abbreviation Meaning
. The current working directory
.. The parent of the current working directory
~ Your home directory
$HOME Your home directory

14. What are the different directory path names ?

Absolute path name - Traces the path from the /(root) directory.
Absolute path names always begin with the slash (/) symbol.
Ex. /home/raja/dir1

Relative path name - Traces the path from the current directory
through its parent or its subdirectories and files. As user "raja", I
can say ./dir1 since I'm already in /home/raja

15. How to move a directory ?

# mvdir book manual

This moves the book directory under the directory named manual, if the manual directory exists. Otherwise, the book directory is renamed to manual.

16. What the RAID groups AIX LVM supports?

RAID-0 - Striping
RAID-1 - Mirroring
RAID-10 (or) RAID 0+1 - Mirroring and striping

17. How to read and remove mails from my system mailbox?

At your system command line prompt, enter the mail command:
# mail

If there is no mail in your system mailbox, the system responds with a message:
No mail for YourID

If there is mail in your mailbox, the system displays a listing of the messages in your system mailbox:

Mail Type ? for help.
"/usr/mail/lance": 3 messages 3 new
>N 1 karen Tue Apr 27 16:10 12/321 "Dept Meeting"
N 2 lois Tue Apr 27 16:50 10/350 "System News"
N 3 tom Tue Apr 27 17:00 11/356 "Tools Available"

The current message is always prefixed with a greater-than symbol (>).

Each one-line entry displays the following fields:

status - Indicates the class of the message.
number - Identifies the piece of mail to the mail program.
sender - Identifies the address of the person who sent the mail.
date - Specifies the date the message was received.
size - Defines the number of lines and characters contained in the message (this includes the header).
subject- Identifies the subject of the message, if it has one.

The status can be any of the following:
N - A new message.
P - A message that will be preserved in your system mailbox.
U - An unread message. This is a message that was listed in the mailbox the last time you used the mail program, but the contents were not examined.
* - A message that was saved or written to a file or folder.

18. What is the difference between IBM system p5 570 and IBM System p570 Server models ?

IBM System p5 570 is the P5(Power5 Processor) server whereas System p
570 is the latest model from IBM containing POWER 6 Processor.

19. How to display the values of NFS tuning parameters?

# nfso -o

20. How to monitor the performance of file systems?

Use filemon command.

21. How to list the available memory slots (DIMM) in your pSeries box ?

# lscfg -vp | grep -e "Memory DIMM" -e "Size"

22. What are the login programs what do not need AIX license ?

ftp, rsh and recec.

23. Have you seen some people use rmt0.1 (or) rmt1.5 for tape device name. We know rmt0 or rmt5 is a tape drive name but whats the ".1" or ".5" that comes after the tape drive name.

Here is the logic

rmt0.x where x = A + B + C

A = density 0 = high 4 = low
B = retension 0 = no 2 = yes
C = rewind 0 = yes 1 = no

So rmt0.1 means tape drive rmt0 with no rewind.
Normally if we use rmt0 for taking backup, after the backup operaation
tape gets rewinded. IF you dont want to rewind, use rmt0.1

24. Tips on System Dump Device

a) Don't mirror the system dump device
b) Don't use compression on the dump device
c) Don't use a secondary dump device unless it is on a seperate device

25. How to monitor/obtain LVM performance?

Use lvmstat command.

26. How to monitor/obtain NFS performance statistics?

Use nfsstat command.

27. How to set the variables defined in a file to the current shell/ environment ?

Suppose you the following variable defined in file1.sh

LANG=jp_JP
TZ=CUT-5

To set them in current shell, run ". ./file1.sh"

28. How will you encode a binary file ?

uuencode command converts a binary file to ascii data. This is mainly used for sending a file thru mail.

For Ex.,
uuencode source_file output_file

29. How you decode a file (which was encoded using uuencode command) ?

# uudecode source_file

30. How to view a a compressed file without uncompressing it ?

Use "zcat file1.Z"

31. How to configure the system to send mails each time an error is added to error report

a. Create a file /tmp/mailtoroot

errnotify:
en_name = "mailtoroot"
en_persistenceflg = 1
en_method = "/usr/bin/errpt -a -l $1 | mail -s \"errpt: $9\" root"

b. odmadd /tmp/mailtoroot

c. Verify by creating a error message

# errlogger 'Test Error Message"

You can always remove this ODM entry using the below command:

# odmdelete -q 'en_name=mailtoroot' -o errnotify