clearlog command

This command clears the CMM audit event log, the system event log, or both.

If command syntax is not correctly entered, or if a command fails to run, an error message is returned. See Common errors for a list of error messages that apply to all commands or clearlog command errors for a list of error messages that are specific to the clearlog command.

Table 1. clearlog (clear CMM event log) command.

The command table is a multi-row, four-column table where each row describes a CMM CLI command option: column one lists command function, column two provides a detailed command description, column three shows command-option syntax, and column four lists valid command targets.

Function What it does Command Target (see paths in Command targets)
Clear CMM event log Clears the both the CMM audit event log and the CMM system event log, displaying a message confirming that both event logs were cleared.
Note:
  • Audit log events are created by the actions of users.
  • Although system events and audit events are stored internally in separate log files, they are presented to the user as a single log that can be filtered.
  • If you clear both logs, an entry indicating you cleared the audit log is shown in the audit log and an entry indicating you cleared the system log is shown in the system log.
clearlog
This command can only be run by users who have one or more of the following command authorities:
  • Supervisor
  • Chassis log management
See Commands and user authority for additional information.
Primary CMM:
  • mm[p]
  • mm[P]
  • mm[x]
  • where x is the primary CMM bay number.
Clear CMM audit or system event log Clears the CMM audit event log, the system event log, or both, and displays a message confirming that the specified event log was cleared.
Note:
  • Audit log events are created by the actions of users.
  • If the log_type is not specified, this command will clear both logs.
  • Although system events and audit events are stored internally in separate log files, they are presented to the user as a single log that can be filtered.
  • If you clear the audit log, an entry indicating you cleared the audit log is shown in the audit log. If you clear the system log, an entry indicating you cleared the system log is shown in the system log. If you clear both logs, an entry indicating you cleared the audit log is shown in the audit log and an entry indicating you cleared the system log is shown in the system log.
clearlog -l log_type

where log_type is audit or system .

This command can only be run by users who have one or more of the following command authorities:
  • Supervisor
  • Chassis log management
See Commands and user authority for additional information.
Primary CMM:
  • mm[p]
  • mm[P]
  • mm[x]
  • where x is the primary CMM bay number.
Example: To clear both the CMM audit log and the CMM system event log, while the primary CMM in bay 1 is set as the persistent command environment, at the system:mm[1]> prompt, type
clearlog
To clear the CMM audit log, while the primary CMM in bay 1 is set as the persistent command environment, at the system:mm[1]> prompt, type
clearlog -1 audit
To clear the CMM system event log, while the primary CMM in bay 1 is set as the persistent command environment, at the system:mm[1]> prompt, type
clearlog -1 system

The following examples shows the information that is returned from these commands:

system:mm[1]> clearlog -1 audit
OK
I  Audit     (CMM 02) The Audit log has been cleared by user ID USERID from SSH at address 9.42.104.88.
I  SERVPROC  (CMM 02) The Event log has been cleared by user ID USERID from SSH at address 9.42.104.88.
system:mm[1]>clearlog -1 audit
OK
I  Audit     (CMM 02) The Audit log has been cleared by user ID USERID from SSH at address 9.42.104.88.
clearlog -1 system
OK
I  SERVPROC  (CMM 02) The Event log has been cleared by user ID USERID from SSH at address 9.42.104.88.