One of AIX system log learning Notes

Source: Internet
Author: User
After the AIX system is launched, errors will inevitably occur. to cope with the errors, aix provides many methods and logging mechanisms for troubleshooting and system convenience. Errdemon is a daemon of aix. this process checks the/dev/drror device file in real time to check whether there is a new internal file... after the AIX system is launched, errors will inevitably occur. to cope with the errors, aix provides many methods and logging mechanisms for troubleshooting and system convenience.
Errdemon is a daemon of aix. this process checks the/dev/drror device file in real time to check whether new content exists and compares it with the system error template, write the error information to the system error log.
 
The Errdemon daemon is automatically started at system startup, or you can manually start it:
#/Usr/lib/errdemon
Disable the errdemon daemon
#/Usr/lib/errstop
# Ps-ef | greperrdemon
 
The AIX error logs are recorded in/var/adm/ras/errlog,
You can determine the location, size, and cache usage of error log files in the system.
/Usr/lib/errdemon-l
Run the following command to change the log file size:
/Usr/lib/errdemon-s 2097153
Log cache settings
/Usr/lib/errdemon-B 16384
 
After the logs are recorded, AIX also provides the errpt command to view error logs. Another diagnostic command is diag used to diagnose and analyze hardware errors, while errpt only prints errors.
1. errpt command
# Errpt -- h
Errpt: Not arecognized flag :-
Usage: errpt-@ wpar_name-actgDP-s startdate-eenddate
-N resource_name_list-Sresource_class_list-R resource_type_list
-T err_type_list-d err_class_list-jid_list-k id_list
-J label_list-K label_list-lseq_no_list-F flags_list
-M machine_id-n node_id-I filename-yfilename-z filename
-I filename
 
Process errorlog entries from the supplied file (s ).
-I filename Uses the error log file specified by thefilename parameter.
-Y filename Uses the error record template file specifiedby the filename
Parameter.
-Z filename Uses the error logging message catalogspecified by the filename
Parameter.
-I filename Uses the diagnostics error log specified bythe filename
Parameter.
 
Output formattederror log entries sorted chronologically.
Show details of all error logs
-A Print adetailed listing. Default is a summary listing.
-C Concurrent mode. Display error logentries as they arrive.
-T Print error templates instead of errorlog entries.
-G Output raw ascii error record structures.
-D required lidate duplicate errors.
-P Show only duplicates from the errordevice driver.
 
Error log entryqualifiers:
-@ Wpar_name Select entries for the wparname.
The following two are the start and end dates.
-S startdate Selectentries posted later than date. (MMddhhmmyy)
-E enddate Selectentries posted earlier than date. (MMddhhmmyy)
-N list Select resource_names in 'list '.
-S list Select resource_classes in 'list '.
-R list Select resource_types in 'list '.
-T list Select types in 'list '.
-D list Select classes in 'list '.
Error ID
-J list Selectids in 'list '.
-K list Select ids NOT in 'list '.
-J list Select labels in 'list '.
-K list Select labels NOT in 'list '.
-L list Select sequence_numbers in 'list '.
-F list Select templates according to the valueof
Alert, Log, or Report field.
-M machine_idSelect entries for the machine id as output by uname-m.
-N node_id Select entries for the node id as output by uname-n.
 
'List' is a listof entries separated by commas.
Error message severity:
Error_type = PERM, TEMP, PERF, PEND, UNKN, INFO
Error Type:
Error_class = H (HARDWARE), S (SOFTWARE), O (errloggerMESSAGES), U (UNDETERMINED)
 
Common commands include:
1. list brief error messages
Errpt | more
2. list all hardware error messages
Errpt-d H
3. list all software error messages
Errpt-d S
4. list detailed error information
Errpt-
5. query by specified error ID
Errpt-aj ERROR_ID
6. Permanent Error message
Errpt-t perm-d H
 
2. error log processing methods
# Errclear delete records from error logs
# Errstop/errdemon stop error logging daemon/start error logging daemon
# Errclear
0315-136 Number of days is required, and must be zero or greater.
Usage:
Errclear-@ wpar_name-J err_label_list-K err_label_list-Nresource_name_list
-R resource_type_list-S resource_class_list-T err_type_list
-D err_class_list-I filename-m machine_id-n node_id
-J id_list-k id_list-l seq_no_list-y filename number_of_days
 
Delete error log entries in the specified list that are older
Number_of_days specified. Number_of_days refers to the number of twenty
Four hour periods from command invocation time.
-@ Wpar_name Delete entriesfor the wpar name.
-J list Select onlyerror_labels in 'list '.
-K list Select onlyerror_labels not in 'list '.
-N list Select onlyresource_names in 'list '.
-S list Select onlyresource_classes in 'list '.
-R list Select onlyresource_types in 'list '.
-T list Select onlyerror_types in 'list '.
-D list Select only error_classes in 'list '.
-I filename Uses the errorlog file specified by the filename parameter.
-J list Select onlyerror_ids in 'list '.
-K list Select onlyerror_ids not in 'list '.
-L list Selectsequence_numbers in 'list '.
-M machine_id Delete entries for the machine id as output by uname-m.
-N node_id Delete entriesfor the node id as output by uname-n.
-Y filename Uses the error recordtemplate file specified by the filename
Parameter.
'List' is a list of entries separated by commas.
Error_type = PERM, TEMP, PERF, PEND, UNKN, INFO
Error_class = H (HARDWARE), S (SOFTWARE), O (errlogger MESSAGES), U (UNDETERMINED)
 
Common errclear commands
To delete all records from the error log, enter:
Errclear 0
 Remove entries of all software error classes from the error log
Errclear-d S 0
Delete all hardware error categories from the error log
Errclear-d H 0

From wolf
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.