Old NCM bucket files are seen in the $SPECROOT/tomcat/mysql/data/reporting directory on the Spectrum Report Manager (SRM) system.
search cancel

Old NCM bucket files are seen in the $SPECROOT/tomcat/mysql/data/reporting directory on the Spectrum Report Manager (SRM) system.

book

Article ID: 388028

calendar_today

Updated On:

Products

Network Observability Spectrum

Issue/Introduction

We noticed there are old many ncmconfigbucket files in the $SPECROOT/tomcat/mysql/data/reporting directory on the Spectrum Report Manager (SRM) system.

We ran the following mysql query on the SRM system to see if there were any ncm bucket tables where the destroy time was null:

select * from bucketactivitylog where destroy_time is null and bucket_table_name like "ncm%";

However, the response was an empty set.

Can these ncmconfigbucket file be removed?

Environment

Version: Any
Component: Spectrum Report Manager (SRM)

Resolution

We verified there were no unprocessed ncmconfigbucket files by running the following command:

select * from bucketactivitylog where destroy_time is null and bucket_table_name like "ncm%";

After verifying an ncmconfigbucket file has been processed, you can drop the table by doing the following:

  • Log into the SRM system as the user that owns the Spectrum installation
  • cd to the $SPECROOT/mysq/bin directory and log into mysql replacing <PASSWD> with the mysql root password:

./mysql --defaults-file=../my-spectrum.cnf -uroot -p<PASSWD> reporting -A

  • Enter the following command replacing <NCM> with the file name of the ncmconfigbucket file minus the ".idb" extension:

drop table <NCM>;

  • After dropping the table, you should no longer see that ncmconfigbucket file in the $SPECROOT/mysql/data/reporting directory

This will need to be done for all the ncmconfigbucket file in the $SPECROOT/mysql/data/reporting directory that have been verified to be processed.

Additional Information

If there are too many ncmconfigbucket files to process one at a time, the following script run from the $SPECROOT/mysql/bin directory will find all ncmconfigbucket files in the $SPECROOT/mysql/data/reporting directory and drop the table for each. You will need to replace <PASSWD> with the mysql root password for your environment.

#!/bin/sh
for NCM in `ls -al ../data/reporting/ncmconfigbucket* | awk '{ print $9 }' | awk -F/ '{ print $4}' | awk -F. '{print $1}'`
do
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<PASSWD> reporting -e "drop table $NCM;"
done