Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get system logs or messages. 1

Status
Not open for further replies.

aixquest

Technical User
Jan 15, 2001
53
US
I have been trying to look into system for logs or messages? How to setup system log to application errors? Your help is appreciated.

 
More specifically, what are you asking for? Why types of logs do you want to see?

Have you tried:

errpt
errpt -a |pg

this should give you system/hardware errors
 
Logs when there is system hang, cron jobs, or application starts? Thanks.
 
/etc/syslog.conf would be a place to start.

Often times application problems (dumps) are in the errpt.

start with those two

 
How to setup /etc/syslog.conf to dump messages to a file?
 
hello,

3 things :

1/ AIX standard event logger (the errdaemon) can be viewed with :
errpt | more

detailed :
errpt -a | more

Clear log :
errclear 0

2/ Some circular files record what happens during installation, or system boot. You can consult them with the alog command :

List logs which can be seen with alog :
alog -L

Check a perticular log file :
alog -t <bootfile> -o | more

Example :
alog -t boot -o | more

Note : if you mistype your alog command, you will have the feeling that the shell hangs (in fact alog is waiting to record some information, just make CTRL-D to exit; the alog command can be used to record some events; a useful feature is that all the output to /dev/console is logged and can be viewed with alog).

Note that there are some shortcuts in smit to see theses circular log files.

3/ Syslog configuration
Quickly : edit /etc/syslog.conf, add a line at the end of file such as :
*.debug /my_logfile

Save, then create this /my_logfile BEFORE restarting syslogd :

touch /my_logfile

Then restart syslogd :
refresh -s syslogd

Monitor in permanence this file :
tail -f /my_logfile

To check this is ok, telnet your host and try to login with bad passwords, this should generate some error message.

NOTE : In order to have syslog intercept some events in an application, the coder of this application * must * have programmed it in order to be able to send messages to a syslog daemon :))


Last Note : many applications have their own log files, and don't care about syslog, errdameon, alog ... (Websphere ?).


regards,




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top