How to determine what events are contained within the ArchiveManager Distributed Data Manager (DDM) database for SPECTRUM? (Legacy KB ID CNC TS31244 )

Document ID : KB000052071
Last Modified Date : 14/02/2018
Show Technical Document Details
Sometimes it may be necessary to see what events are filling up a ddmdb mysql database.  This would be useful because if the database is filling up, modifications can be made to stop the logging of unwanted or unneeded events.  This is generally done with modification to event mappings via the EventDisp files (please review the Event Configuration Guide - pdf 5188.pdf for steps on how to stop SPECTRUM from logging events).


In order to see what events are contained within the ddmdb database, navigate in a shell window on the SpectroSERVER machine to the <SPECROOT>/mysql/bin directory and run the following command (this is all one command):


./mysql --defaults-file=../my-spectrum.cnf -uroot -proot ddmdb -e "select hex( type ), hex( e.model_h ), m.model_name, count( * ) as cnt from event e, model m where e.model_h = m.model_h group by type, e.model_h order by cnt desc limit 500"


This will take a while to run before it returns any results.  Do NOT kill the query as you may corrupt the database.  The output will look like this:



+-------------+------------------+--------------------------------------------------------+-------+


- hex( type ) - hex( e.model_h ) - model_name - cnt -


+-------------+------------------+--------------------------------------------------------+-------+


- 4560000 - 104AE2 - New SPECTRUM Response Time Test Template_model_A - 31716 -


- 4560074 - 105A10 - New SPECTRUM Response Time Test Template_model_B - 29208 -


- 4560000 - 104B2C - New SPECTRUM Response Time Test Template_model_C - 27300 -


- 4560000 - 104AE4 - New SPECTRUM Response Time Test Template_model_D - 25627 -


- 10802 - 100000 - SPECTRUM-01.ca.com - 5612 -


- 4560000 - 104AE3 - New SPECTRUM Response Time Test Template_model_E - 4238 -


- 10105 - 100036 - SPECTRUM - 2801 -


- 10701 - 104B1A - cisco7204.ca.com_Fa0/0 - 2008 -


- 10702 - 104B1A - cisco7204.ca.com_Fa0/0 - 2008 -


- 10701 - 1048A1 - cisco7204.ca.com - 1794 -


The first column shows the Event Type.  For example, 4560000 is Event04560000.


The second column is the model handle of the device


The third column is the model name of the device


The fourth column is the number of events that are contained within the database for that event.  If these events are not needed, then they can be disabled with modification to the Event Mappings.

.

Related Issues/Questions:
How can a user determine what events are contained within the ArchiveManager Distributed Data Manager (DDM) database for SPECTRUM?
The Archive Manager shuts down because the ddm database is too large
How can I tell what events are filling the mysql ddmdb database on a SpectroSERVER?

Problem Environment:

CallT0000235354


SPECTRUM 9.0 Apps
SPECTRUM 8.1
SPECTRUM all platforms


(Legacy KB ID CNC TS31244 )