cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3129
Views
0
Helpful
5
Replies

is possible to clear syslog database in LMS 3.2?

ROMAN TOMASEK
Level 1
Level 1

Hi,

I have the problem with size of three databases (SyslogFirst.db, SyslogSecond.db and SyslogThree.db). Is possible to clear these databases?? I have logrot configured, but this application influnces only size of syslog.log. Thank you very much.

Roman

1 Accepted Solution

Accepted Solutions

Hi, 
Try the below steps and that will clear all the syslogDB.

For this go to dbreader and put the following in the AD-hoc page:
 
To login to DBreader 
http://hostname:1741/dbreader/dbreader.html                  (here host name is the Name of the server)
 
User Id: DBA
Password: rmeng db password         (default is C2kY2k)
Database Name: rmeng
 
And click the get tables button.
 
--------
If you do not know the Password , then you can reset the Password as below :
 
C:/program files/CSCOpx/bin > dbpasswd.pl dsn= rme npwd=cisco                        ( where npwd is your new Password)
-------
 
 
In the tables look for the SYSLOG_* type of tables and note their names.
 
 example:
 
SYSLOG_20090631           
 
SYSLOG_20090701
 
Then go back to the Ad-hoc page and issue the following sql statement:
 
DROP TABLE SYSLOG_20090701
 
Delete all the SYSLOG_ files and then issue the same Script  server: DBspaceReclaimer.pl
as you ran last time.
 

 
This is the output that you will notice:
 RMEDbEngine needs to be restarted before this tool is run.
 
dropped DB space - SyslogSecond.db
 
Successfully re-created db space SyslogSecond.db
 
dropped DB space - SyslogThird.db
 
Successfully re-created db space SyslogThird.db
 
dropped DB space - SyslogFirst.db
 
Successfully re-created db space SyslogFirst.db
 
As one or more application will be down , it is recommended to restart the daemon manager now.
 
This states that all the syslog.db files are cleared.
 
To verify this go to NMSROOT\database\rmeng and look the size of syslogFirst.db, syslogSecond.db, syslogThird.db files.

I hope that should work for you..

Thanks--

Afroj

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

View solution in original post

5 Replies 5

AFROJ AHMAD
Cisco Employee
Cisco Employee

HI Roman ,

With LMS 3.2 there is an Inbuild utilty that you can run to clear the syslog.db ,it's called

DBspaceReclaimer.

Here are the steps to run the Script:
On the Cammon prompt :do pdterm RMEDbEngine command. 

Verify it  is down with pdshow RMEDbEngine. Then do pdexec RMEDbEngine command. Verify it is back up with pdshow RMEDbEngine. Now on the Commond prompt CD to NMSROOT\CSCOpx\MDC\tomcat\webapps\rme\WEB-INF\debugtools\dbcleanup. From there, type in the following command: NMSROOT\CSCOpx\bin\perl DBspaceReclaimer.pl After all three syslog spaces are dropped, restart daemon manager: net stop crmdmgtd net start crmdmgtd NMSROOT = Location where you installed CiscoWorks.

I hope this will work for you !!

Thanks--
Afroj
Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

Hi Afroj,

thank you very much. I have the problem that only one syslog database was cleared. Remaining two databases have the large size. I don't know where is a problem:-(

I'm sending you the output from the using of DBspaceReclaimer scriptu:

C:\Program Files\CSCOpx\MDC\tomcat\webapps\rme\WEB-INF\debugtools\dbcleanup>pdte
rm RMEDbEngine

C:\Program Files\CSCOpx\MDC\tomcat\webapps\rme\WEB-INF\debugtools\dbcleanup>pdsh
ow RMEDbEngine
        Process= RMEDbEngine
        State  = Administrator has shut down this server
        Pid    = 0
        RC     = 0
        Signo  = 0
        Start  = 6/7/2011 12:23:45 PM
        Stop   = 6/7/2011 12:25:54 PM
        Core   = Not applicable
        Info   = Not applicable


C:\Program Files\CSCOpx\MDC\tomcat\webapps\rme\WEB-INF\debugtools\dbcleanup>pdex
ec RMEDbEngine

C:\Program Files\CSCOpx\MDC\tomcat\webapps\rme\WEB-INF\debugtools\dbcleanup>pdsh
ow RMEDbEngine
        Process= RMEDbEngine
        State  = Program started - No mgt msgs received
        Pid    = 14436
        RC     = 0
        Signo  = 0
        Start  = 6/7/2011 12:26:09 PM
        Stop   = Not applicable
        Core   = Not applicable
        Info   = Application started by administrator request.


C:\Program Files\CSCOpx\MDC\tomcat\webapps\rme\WEB-INF\debugtools\dbcleanup>c:\P
rogra~1\CSCOpx\bin\perl DBspaceReclaimer.pl
Before running DBSpaceReclaimer script make sure Syslog purge is run successfull
y.
Make sure RMEDbEngine is restarted.
To restart RMEDbEngine execute the commands 'pdterm RMEDbEngine' and 'pdexec RME
DbEngine'.
For more info go through the 'Syslog DBSpaceReclaimer Tool' section in RMEDebugT
oolsReadme.txt under C:\PROGRA~1\CSCOpx
Do you want to proceed [y\n]:y
RMEDbEngine needs to be restarted before this tool is run.
drooping dbspace
Dropped true
dropped DB space - SyslogSecond.db
Successfully re-created db space SyslogSecond.db
drooping dbspace
Dropped false
SyslogThird.db cannot be deleted.
drooping dbspace
Dropped false
SyslogFirst.db cannot be deleted.
As one or more application will be down , it is recommended to restart the daem
on manager now.

C:\Program Files\CSCOpx\MDC\tomcat\webapps\rme\WEB-INF\debugtools\dbcleanup>net
stop crmdmgtd
The CiscoWorks Daemon Manager service is stopping...............................
........................
The CiscoWorks Daemon Manager service was stopped successfully.


C:\Program Files\CSCOpx\MDC\tomcat\webapps\rme\WEB-INF\debugtools\dbcleanup>net
start crmdmgtd
The CiscoWorks Daemon Manager service is starting.
The CiscoWorks Daemon Manager service was started successfully.


Thank you

Roman

Run it a few times....it can't drop space in all the tables at the same time...it has to be writing to one of them at least.

Hi, 
Try the below steps and that will clear all the syslogDB.

For this go to dbreader and put the following in the AD-hoc page:
 
To login to DBreader 
http://hostname:1741/dbreader/dbreader.html                  (here host name is the Name of the server)
 
User Id: DBA
Password: rmeng db password         (default is C2kY2k)
Database Name: rmeng
 
And click the get tables button.
 
--------
If you do not know the Password , then you can reset the Password as below :
 
C:/program files/CSCOpx/bin > dbpasswd.pl dsn= rme npwd=cisco                        ( where npwd is your new Password)
-------
 
 
In the tables look for the SYSLOG_* type of tables and note their names.
 
 example:
 
SYSLOG_20090631           
 
SYSLOG_20090701
 
Then go back to the Ad-hoc page and issue the following sql statement:
 
DROP TABLE SYSLOG_20090701
 
Delete all the SYSLOG_ files and then issue the same Script  server: DBspaceReclaimer.pl
as you ran last time.
 

 
This is the output that you will notice:
 RMEDbEngine needs to be restarted before this tool is run.
 
dropped DB space - SyslogSecond.db
 
Successfully re-created db space SyslogSecond.db
 
dropped DB space - SyslogThird.db
 
Successfully re-created db space SyslogThird.db
 
dropped DB space - SyslogFirst.db
 
Successfully re-created db space SyslogFirst.db
 
As one or more application will be down , it is recommended to restart the daemon manager now.
 
This states that all the syslog.db files are cleared.
 
To verify this go to NMSROOT\database\rmeng and look the size of syslogFirst.db, syslogSecond.db, syslogThird.db files.

I hope that should work for you..

Thanks--

Afroj

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****

Hi Afroj,

great. It is working!!! Thank you very much!!

Roman