Deletes entries from the error log.
errclear [ -d ErrorClassList ] [ -i File ] [ -J ErrorLabel [ ,Errorlabel ] ] | [ -K ErrorLabel [ ,Errorlabel ] ] [ -l SequenceNumber ] [ -m Machine ] [ -n Node ] [ -N ResourceNameList ] [ -R ResourceTypeList ] [ -S ResourceClassList ] [ -T ErrorTypeList ] [ -y FileName ] [ -j ErrorID [ ,ErrorID ] ] | [ -k ErrorID [ ,ErrorID ] ] Days
The errclear command deletes error-log entries older than the number of days specified by the Days parameter. To delete all error-log entries, specify a value of 0 for the Days parameter.
If the -i flag is not used with the errclear command, the error log file cleared by errclear is the one specified in the error log configuration database. (To view the information in the error log configuration database, use the errdemon command.)
Note: The errclear command clears the specified entries, but does not decrease the error log file size.
You can use the System application in Web-based System Manager (wsm) to change system characteristics. You could also use the System Management Interface Tool (SMIT) smit errclear fast path to run this command.
Item | Description |
---|---|
-d List | Deletes error-log entries in the error classes specified by the List variable. The List variable values can be separated by , (commas), or enclosed in " " (double quotation marks) and separated by , (commas) or space characters. The valid List variable values are H (hardware), S (software), O (errlogger messages), and U (undetermined). |
-i File | Uses the error-log file specified by the File variable. If this flag is not specified, the errclear command uses the value from the error-log configuration database. |
-j ErrorID[,ErrorID] | Deletes the error-log entries specified by the ErrorID (error identifier) variable. The ErrorID variable values can be separated by , (commas), or enclosed in " " (double quotation marks) and separated by , (commas) or space characters. |
-J ErrorLabel | Deletes the error-log entries specified by the ErrorLabel variable. The ErrorLabel variable values can be separated by , (commas), or enclosed in " " (double quotation marks) and separated by , (commas) or space characters. |
-k ErrorID[,ErrorID] | Deletes all error-log entries except those specified by the ErrorID (error identifier) variable. The ErrorID variable values can be separated by , (commas), or enclosed in " " (double quotation marks) and separated by , (commas) or space characters. |
-K ErrorLabel | Deletes all error-log entries except those specified by the ErrorLabel variable. The ErrorLabel variable values can be separated by , (commas), or enclosed in " " (double quotation marks) and separated by , (commas) or space characters. |
-l SequenceNumber | Deletes error-log entries with the specified sequence numbers. The SequenceNumber variable values can be separated by , (commas), or enclosed in " " (double quotation marks) and separated by , (commas) or space characters. |
-m Machine | Deletes error-log entries for the machine specified by the Machine variable. The uname -m command returns the value of the Machine variable. |
-n Node | Deletes error-log entries for the node specified by the Node variable. The uname -n command returns the value of the Node variable. |
-N List | Deletes error-log entries for the resource names specified by the List variable. The List variable is list of names of resources that have detected errors. For software errors, these are the names of resources that have detected errors. For hardware errors, these are names of devices or system components. It does not indicate that the component is faulty or needs replacement. Instead, it is used to determine the appropriate diagnostic modules to be used to analyze the error. The List variable values can be separated by , (commas), or enclosed in " " (double quotation marks) and separated by , (commas) or space characters. |
-R List | Deletes error-log entries for the resource types specified by the List variable. For hardware errors, the List variable is a device type. For software errors, the value of the List variable is LPP. The List variable values can be separated by , (commas), or enclosed in " " (double quotation marks) and separated by , (commas) or space characters. |
-S List | Deletes error-log entries for the resource classes specified by the List variable. For hardware errors, the List variable is a device class. The List variable values can be separated by , (commas), or enclosed in " " (double quotation marks) and separated by , (commas) or space characters. |
-T List | Deletes error-log entries for error types specified by the List variable. Valid List variable values are: PERM, TEMP, PERF, PEND, INFO, and UNKN. The List variable values can be separated by , (commas), or enclosed in " " (double quotation marks) and separated by , (commas) or space characters. |
-y FileName | Uses the error-record template file specified by the FileName variable. |
Access Control: Only the root user can run this command.
errclear 0
errclear -d S 0
errclear -i /var/adm/ras/errlog.alternate 0
errclear -i /var/adm/ras/errlog.alternate -d H 0
Item | Description |
---|---|
/etc/objrepos/SWservAt | Contains the Software Service Aids Attributes object class, which is the error-log configuration database. |