Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
### Current unix epoch time
[root@opmantek ~]# date +%s
1513316674

### Let X be The difference of current time and oldest record time converted to minutes
>>> (1513316674-1430511439)/60
1380087.25

### There are 129600 minutes in 90 days.  Subtract 129600 minutes from X.
>>> 1380087 - 129600
1250487

### Based on this the events_purge_older_than should be 1250487

Run the opEvents Purge Command

First run the command in simulate mode to ensure the math is correct

Code Block
[root@DC4-opmantek02 ~]# /usr/local/omk/bin/opevents-cli.exe act=purge events_purge_older_than=52560 debug=1 simulate=true
[Fri Dec 15 05:54:31 2017] [debug] cli[31377] Purging unwanted database indices
[Fri Dec 15 05:54:31 2017] [debug] cli[31377] Db purge of rawlogs: 0 entries (of 7161464) in rawLogs are older than 1y270d50m
Db purge of rawlogs: 0 entries (of 7161464) in rawLogs are older than 1y270d50m
[Fri Dec 15 05:54:31 2017] [debug] cli[31377] Simulated purging rawlogs: would remove 0 (of 7161464) entries from rawLogs
Simulated purging rawlogs: would remove 0 (of 7161464) entries from rawLogs
[Fri Dec 15 05:54:31 2017] [debug] cli[31377] Purging disabled for archivelogs
Purging disabled for archivelogs
[Fri Dec 15 05:54:33 2017] [debug] cli[31377] Db purge of events: 4692044 entries (of 5060913) in events are older than 36d12h
Db purge of events: 4692044 entries (of 5060913) in events are older than 36d12h
[Fri Dec 15 05:54:33 2017] [debug] cli[31377] Simulated purging events: would remove 4692044 (of 5060913) entries from events
Simulated purging events: would remove 4692044 (of 5060913) entries from events
[Fri Dec 15 05:54:37 2017] [debug] cli[31377] Db purge of events: 12831334 entries (of 13803156) in actionlog are older than 36d12h
Db purge of events: 12831334 entries (of 13803156) in actionlog are older than 36d12h
[Fri Dec 15 05:54:37 2017] [debug] cli[31377] Simulated purging events: would remove 12831334 (of 13803156) entries from actionlog
Simulated purging events: would remove 12831334 (of 13803156) entries from actionlog
[Fri Dec 15 05:54:37 2017] [debug] cli[31377] Purging disabled for reports
Purging disabled for reports