cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1398
Views
10
Helpful
10
Replies

LMS 4.1 Housekeeping

Hello all,

My job descritpion is network administrator/engineer. But for years I have been in charge of CW and now LMS 4.1. Since I am not a system engineer in profession, it has always been difficult for me to understand how to keep databases and log files in order and how to troubleshoot system related stuff, without causing any problems.

I mean that besides setting jobs (device discovery, netconfig, usertracking, archiving and the like), what else do I need to check on a regularly basis, which jobs can I delete with safety, what kind o log rotation should I configure???

For example, I have noticed that the ConfigMgmtServer.log is quite large (1,2 Gbytes). Is it safe to rotate this???

Is there any guide as to what maintenance jobs should be performed???

Thank you in advance,

Katerina

10 Replies 10

Duong Nguyen
Level 1
Level 1

Basically if you find any logs that are huge size under CiscoPrime\log folder, you can do logrotate them.

Some files to watchout are syslog.log jrm.log which generally get big in size

Great! Thanks for the info...

I am already doing logrot on syslog.log. The ConfigMgmtServer.log is getting quite large. At the moment it is about 1,3Gbyte. I will also rotate this.

Kind Regards,

Katerina

Ok!

I seem to be getting mixed up!

My ConfigMgmtServer.log is 1198699KB large. That is approximately 1.14 Gbytes. So, I configured log ration for ConfigMgmtServer.log with these values:

size:      10240Kb (way smaller than the actual log size)

format:   gz

No of backups: 2

The thing is that I don't see any change to the ConfigMgmtServer.log. I would have excpected that zipped backups would have automatically been made and that the ConfigMgmtServer.log size would have become smaller.

Nothing like that happened!

I also performed an immediate scheduled log rotation which resulted in ConfigMgmtServer.log.0.gz, but again nothing changed to the size of the original ConfigMgmtServer.log.

What am I doing wrong? I feel there is something I am not grasping!

Thank you in advance,

Katerina

Your correct, logrot will not change the file size of the initial log file.  By performing logrot you created another active log file "ConfigMgmtServer.log-2"  This new log file is active and all config logs are writtin to this file.  Depending on the number of back ups/iterations you have set up   (2) in this case at 10240kb, the log files will continue to grow to 10240kb and rotate to a new file.

But I wonder if we have to setup some type of purge settings for these log files or does configuring the number of backups automatically purge the previous logs when it rotates and only keeping the number of files you declared as a backup.

If you have any log file extremely huge and you want to instantly reduce the size to get the disk space back, you can purge or truncate the data from :

NMSROOT\bin\logrot_trunc NMSROOT\log\xxxx.log

This would remove the log data instantly. Than to control size to not to increase in future you can configure logrot.

-Thanks Vinod **Rating Encourages contributors, and its really free. **

Thank you guys for your input!

I run NMSROOT\bin\logrot_trunc NMSROOT\log\xxxx.log, as Vinod suggested, so I managed to initialize the log file (I had to stop the services, before truncating. Is this correct?)

Now  I will have to see what happens when its size reaches the value I have  set. I have set logrot to run monthly, so I will just wait and see!!!!

Cheers

Good to know it helped.

You dont have to stop the services, to run logrot_trunc on any lg file.

-Thanks

-Thanks Vinod **Rating Encourages contributors, and its really free. **

That is what I also thought.

I run logrot_trunc without stopping the services and the log file seemed to be of zero size, but after a while it returned to its initial size.

I then stopped the services, run logrot_trunc (zero size file) and then restarted the daemons. The size of the log file seemed to have started from scratch!

I have no idea why this happened!

Is it a windows server? I have seen sometime, on windows, if you truncate a file, it will remove the data but the new data would enter after a blank space which got truncated.

So eventually the new data starts after that blank space and shows the same size as before.

But this is not always.

-Thanks

-Thanks Vinod **Rating Encourages contributors, and its really free. **

Yes, it is a Windows server!

Glad to know why this happened!

Thanks so much