[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 2

errclear Command

Purpose

Deletes entries from the error log.

Syntax

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

Description

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.

Flags

-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.

Security

Access Control: Only the root user can run this command.

Examples

  1. To delete all entries from the error log, enter:

    errclear 0
  2. To delete all entries in the error log classified as software errors, enter:

    errclear -d S 0
  3. To clear all entries from the alternate error-log file /var/adm/ras/errlog.alternate, enter:

    errclear -i /var/adm/ras/errlog.alternate 0
  4. To clear all hardware entries from the alternate error-log file /var/adm/ras/errlog.alternate, enter:

    errclear -i /var/adm/ras/errlog.alternate -d H 0

Files

/etc/objrepos/SWservAt Contains the Software Service Aids Attributes object class, which is the error-log configuration database.

Related Information

The errdead command, errinstall command, errlogger command, errmsg command, errpt command, errstop command, errupdate command, uname command.

The errdemon daemon.

The errsave kernel service.

The errlog subroutine.

Error Logging Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

For information on installing the Web-based System Manager, see Chapter 2: Installation and System Requirements in AIX 5L Version 5.2 Web-based System Manager Administration Guide.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]