Tuesday, October 22, 2013

View AIX Boot and Console Logs


Boot and console messages can be used to identify and fix problems. These messages are automatically stored on disk by AIX. To view the stored messages, use the alog command. 

For example,

To List the defined log types in AIX

alog -L                
 
 # alog -L
 boot
 bosinst
 nim
 console
 cfg
 dumpsymp
 
To View the boot log in AIX
  alog -o -t boot   

To View the console log in AIX  
  alog -o -t console     

To find out the properties of boot log file in AIX

 # alog -L -t boot
 file:size:verbosity
 /var/adm/ras/bootlog:131072:1

Redirect console messages to /dev/console..



After this change, they will now all go to /tmp/console.log.`date +%m%y%d`

edit file /etc/rc.local

add this line

swcons /tmp/consolelog.`date +%m%d%y`

This will redirect all console messages to this file note it will create a new file new file every time the system is rebooted. 


So you should do clean up of old files once a month or when ever you reboot..