下面我们来看errpt命令的使用。
# errpt
IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
9DBCFDEE 0109034400 T O errdemon ERROR LOGGING TURNED ON
192AC071 0109034300 T O errdemon ERROR LOGGING TURNED OFF
C092AFE4 0109033500 I O ctcasd ctcasd Daemon Started
A6DF45AA 0109033500 I O RMCdaemon The daemon is started.
9DBCFDEE 0109033400 T O errdemon ERROR LOGGING TURNED ON
192AC071 0106130900 T O errdemon ERROR LOGGING TURNED OFF
369D049B 0106082400 I O SYSPFS UNABLE TO ALLOCATE SPACE IN FILE SYSTE
这里的输出分为六列依次为:
1.错误标示符IDENTIFIER:并不唯一,由它来确定使用的错误模板,显然同一种错误的IDENTIFIER是相同的。
2.时间戳TIMESTAMP:错误发生的时间,MMDDhhmmYY,依次表示月日时分年。
3.类型TYPE:错误的类型,或者说严重的程度。
分为6个:
PEND 设备或功能组件可能丢失 简写P
PERF 性能严重下降 P
PERM 硬件设备或软件模块损坏,确诊了的 P
TEMP 临时性错误,经过重试后已经恢复正常 T
INFO 一般消息,不是错误 I
UNKN 不能确定错误的严重性 U
4.种类CLASS c:指出错误源
H 硬件或介质故障
S 软件故障
O 人为错误
U 不能确定
5. 资源名RESOURCE_NAME
最初检测到错误的资源名软件或者硬件,并不代表这个资源有问题,而只是最先在它发现的。
6.描述
显示具体的日志信息
以下为常用的errpt使用
errpt 命令
- Usage: errpt -aActgDP -s startdate -e enddate
- -N resource_name_list -S resource_class_list -R resource_type_list
- -T err_type_list -d err_class_list -j id_list -k id_list
- -J label_list -K label_list -l seq_no_list -F flags_list
- -m machine_id -n node_id -i filename -y filename -z filename
- -I filename
- Process error log entries from the supplied file(s).
- -i filename Read error log entries from the supplied file.
- -y filename Uses the error record template file specified by the filename
- parameter.
- -z filename Uses the error logging message catalog specified by the filename
- parameter.
- -I filename Uses the diagnostics error log specified by the filename
- parameter.
- Output formatted error log entries sorted chronologically.
- -a Print a detailed listing. Default is a summary listing.
- -A Print an abbreviated detailed listing.
- -c Concurrent mode. Display error log entries as they arrive.
- -t Print error templates instead of error log entries.
- -g Output raw ascii error template structures.
- -D Consolidate duplicate errors.
- -P Show only duplicates from the error device driver.
- Error log entry qualifiers:
- -s startdate Select entries posted later than date. (MMddhhmmyy)
- -e enddate Select entries 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 error_types in 'list'.
- -d list Select error_classes in 'list'.
- -j list Select error_ids in 'list'.
- -k list Select error_ids not in 'list'.
- -J list Select error_labels in 'list'.
- -K list Select error_labels not in 'list'.
- -l list Select sequence_numbers in 'list'.
- -F list Select templates according to the value of the
- Alert, Log, or Report field.
- -m machine_id Select 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 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)
显示错误信息摘要:
- # errpt
- IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
- 9DBCFDEE 1028114712 T O errdemon ERROR LOGGING TURNED ON
- 192AC071 1028114712 T O errdemon ERROR LOGGING TURNED OFF
- 9DBCFDEE 1028114612 T O errdemon ERROR LOGGING TURNED ON
- 192AC071 1028114612 T O errdemon ERROR LOGGING TURNED OFF
详细信息:
- # errpt -a
- ---------------------------------------------------------------------------
- LABEL: ERRLOG_ON
- IDENTIFIER: 9DBCFDEE ---对应第一条的第一个字段
- Date/Time: 公元2012年10月28日 星期日 11时47分41秒
- Sequence Number: 141
- Machine Id: 00C43EE54C00
- Node Id: wlancol3
- Class: O
- Type: TEMP
- Resource Name: errdemon
- Description
- ERROR LOGGING TURNED ON
- Probable Causes
- ERRDEMON STARTED AUTOMATICALLY
- User Causes
- /USR/LIB/ERRDEMON COMMAND
- Recommended Actions
- NONE
按时间显示错误详细信息:
- # date
- 公元2012年10月28日 星期日 12时05分29秒
- # errpt -a -s 1028114612
- ---------------------------------------------------------------------------
- LABEL: ERRLOG_ON
- IDENTIFIER: 9DBCFDEE
- Date/Time: 公元2012年10月28日 星期日 11时47分41秒
- Sequence Number: 141
- Machine Id: 00C43EE54C00
- Node Id: wlancol3
- Class: O
- Type: TEMP
- Resource Name: errdemon
- Description
- ERROR LOGGING TURNED ON
- Probable Causes
- ERRDEMON STARTED AUTOMATICALLY
- User Causes
- /USR/LIB/ERRDEMON COMMAND
- Recommended Actions
- NONE
- ---------------------------------------------------------------------------
- LABEL: ERRLOG_OFF
- IDENTIFIER: 192AC071
- Date/Time: 公元2012年10月28日 星期日 11时47分38秒
- Sequence Number: 140
- Machine Id: 00C43EE54C00
- Node Id: wlancol3
- Class: O
- Type: TEMP
- Resource Name: errdemon
- Description
- ERROR LOGGING TURNED OFF
- Probable Causes
- ERRSTOP COMMAND
- User Causes
- ERRSTOP COMMAND
- Recommended Actions
- RUN ERRDEAD COMMAND
- TURN ERROR LOGGING ON
- ---------------------------------------------------------------------------
- LABEL: ERRLOG_ON
- IDENTIFIER: 9DBCFDEE
- Date/Time: 公元2012年10月28日 星期日 11时46分15秒
- Sequence Number: 138
- Machine Id: 00C43EE54C00
- Node Id: wlancol3
- Class: O
- Type: TEMP
- Resource Name: errdemon
- Description
- ERROR LOGGING TURNED ON
- Probable Causes
- ERRDEMON STARTED AUTOMATICALLY
- User Causes
- /USR/LIB/ERRDEMON COMMAND
- Recommended Actions
- NONE
- ---------------------------------------------------------------------------
- LABEL: ERRLOG_OFF
- IDENTIFIER: 192AC071
- Date/Time: 公元2012年10月28日 星期日 11时46分12秒
- Sequence Number: 137
- Machine Id: 00C43EE54C00
- Node Id: wlancol3
- Class: O
- Type: TEMP
- Resource Name: errdemon
- Description
- ERROR LOGGING TURNED OFF
- Probable Causes
- ERRSTOP COMMAND
- User Causes
- ERRSTOP COMMAND
- Recommended Actions
- RUN ERRDEAD COMMAND
- TURN ERROR LOGGING ON
按错误ID显示错误详细信息:
- # errpt -aj 9DBCFDEE
- ---------------------------------------------------------------------------
- LABEL: ERRLOG_ON
- IDENTIFIER: 9DBCFDEE
- Date/Time: 公元2012年10月28日 星期日 11时47分41秒
- Sequence Number: 141
- Machine Id: 00C43EE54C00
- Node Id: wlancol3
- Class: O
- Type: TEMP
- Resource Name: errdemon
- Description
- ERROR LOGGING TURNED ON
- Probable Causes
- ERRDEMON STARTED AUTOMATICALLY
- User Causes
- /USR/LIB/ERRDEMON COMMAND
- Recommended Actions
- NONE
- ---------------------------------------------------------------------------
- LABEL: ERRLOG_ON
- IDENTIFIER: 9DBCFDEE
- Date/Time: 公元2012年10月28日 星期日 11时46分15秒
- Sequence Number: 138
- Machine Id: 00C43EE54C00
- Node Id: wlancol3
- Class: O
- Type: TEMP
- Resource Name: errdemon
- Description
- ERROR LOGGING TURNED ON
- Probable Causes
- ERRDEMON STARTED AUTOMATICALLY
- User Causes
- /USR/LIB/ERRDEMON COMMAND
- Recommended Actions
- NONE
硬件错误:
- errpt -dH
软件错误:
- errpt -dS
错误信息:
- errpt -dO
- IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
- 9DBCFDEE 1028114712 T O errdemon ERROR LOGGING TURNED ON
- 192AC071 1028114712 T O errdemon ERROR LOGGING TURNED OFF
- 9DBCFDEE 1028114612 T O errdemon ERROR LOGGING TURNED ON
- 192AC071 1028114612 T O errdemon ERROR LOGGING TURNED OFF
未定义错误:
- errpt -dU
aix中的errlogger 像linux 中的Logger 一样,可以人为的模拟一条错误信息到系统日志中,发送的errlogger 错误信息长度<=1024字节。
删除所有日志:
- errclear 0
写一条日志:
- # errpt
- # errlogger admin test use logger
- # errpt
- IDENTIFIER TIMESTAMP T C RESOURCE_NAME DESCRIPTION
- AA8AB241 1028123312 T O OPERATOR OPERATOR NOTIFICATION
- # errpt -a
- ---------------------------------------------------------------------------
- LABEL: OPMSG
- IDENTIFIER: AA8AB241
- Date/Time: 公元2012年10月28日 星期日 12时33分17秒
- Sequence Number: 144
- Machine Id: 00C43EE54C00
- Node Id: wlancol3
- 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
- admin test use logger