eventpurge command-line utility

Use the eventpurge command-line utility to delete events from the event database. You can delete all events from the event database, or you can limit the deletion to events meeting certain criteria.

Prerequisites

If WebSphere® security is enabled, your user ID must be mapped to the eventAdministrator role to delete events.

Syntax

eventpurge
-seconds seconds |  -end end_time
[-group event_group]
[-severity severity]
[-extensionname extension_name]
[-start start_time]
[-size size]

Parameters

-seconds seconds
The minimum age of events you want deleted. The seconds value must be an integer. Only events older than the specified number of seconds are deleted. This parameter is required if you do not specify the -end parameter.
-end end_time

The end time of the group of events you want to delete. Only events generated before the specified time are deleted. The end_time value must be specified in the XML dateTime format (CCYY-MM-DDThh:mm:ss ). For example, noon on 1 January 2006 in Eastern Standard Time would be 2006-01-01T12:00:00-05:00.

Tip: For more information about the dateTime data type, refer to the XML schema at www.w3.org.

This parameter is required if you do not specify the -seconds parameter.

-group eventGroup
Optional parameter that specifies the event group from which to delete events. The event_group value must be the name of an event group defined in the Common Event Infrastructure configuration.
-severity severity
Optional parameter that specifies the severity of the events you want deleted. The severity value must be an integer; only events whose severity is equal to the value you specify are deleted.
-extensionname extension_name
Optional parameter that specifies the extension name of the events you want included in the deletion. Use this parameter to restrict the deletion to events of a specific type. Only events whose extensionName property is equal to extensionName are deleted.
-start start_time
Optional parameter that specifies the beginning time of the group of events you want to delete. Only events generated after the specified time are deleted. The start_time value must be specified in the XML dateTime format (CCYY-MM-DDThh:mm:ss).
-size size
Optional parameter that specifies the number of events to delete in a single transaction. The size value must be an integer. After this number of events have been deleted, the command commits the transaction before continuing in a new transaction.

Examples

The following example deletes all events from the database whose severity is 20 (harmless) and were generated earlier than 10 minutes ago.
eventpurge -group "All events" -severity 20 -seconds 600