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

LMS3.2 log rotation (syslog_info)

tomeq82
Level 1
Level 1

Hi,

What should I do to get my syslog_info file rotated whenver the file grows to 512 megabytes in size? I've set up the log rotation in Common Services->Server->Admin but it doesn't seem to work, the file grew to 1.9 gigabytes.

Is there any process that should be running that monitors the logrotation?

Greets,

Tomek

10 Replies 10

Michel Hegeraat
Level 7
Level 7

You can run the logrot manually by clicking on the schedule button and clicking the "now" selector.

Check if it works on any of the configured logs. Create a few entries that should also get rotated if needed.

I don't think logrot depends on any other process.

Cheers,

Michel

It works when manually triggered from GUI or by running logrot.pl script. But it doesn't automagically

There should be a process that monitors or polls the log size and rotate it when it will exceed certain size... or else I don't understand how LMS rotates the logs...

Yes, you need to schedule the process to detect if a log has exceeded the size limit you have configured.  Instead of running a manual one, just schedule it to your liking with the available options.

I did that. And the log file doesn't rotate with set criteria. As I said - it exceeded 512 meg limit and did just nothing.

I know there is an option to restart the deamon manager to get to the logfiles that are locked by a process but I thought this only aplied to the tomcat logs.

But try with the restart option

Cheers,

Michel

Restarting dmgtd is not an option and most probably it would not work for that case.

I would like to see if any overgrown log file will rotate. For example - I set max log file size to 512 megabytes. And I expect that LMS will somehow monitor the size of the file (for example with an entry in crontab, or by a specified daemon) and rotate it whenver the log file exceeds previously set size.

That doesn't work that way. The file grows and exceeds set size. Only manual triggering of rotation process works as expected.

Is that a bug?

So manually it works but via the scheduler it doesn't?

Is the service for the task scheduler running?

And if it is, can casuser use it? Normally it can, but if a server has being tampered with by a GPO e.g. to limit local users you never know what can be changed.

The scheduler writes to the eventlogs, so check there if it complains about anything

Cheers,

Michel

Yes, manually it works. Otherwise it doesn't. We are talking about Solaris There is cron and indeed it is running. Documentation says, that creating a schedule for log rotation should be visible in cron but it isn't. At least as a separate entry. There are no periodic jobs in LMS anywhere concerning log rotation...

Can casuser use cron? Do an su - casuser and type crontab -e

If you can, create an entry. The .pl script to run is in /opt/CSCOpx/objects/logrot/

I've not yet come across a situation where lms couldn't add cronjobs on solaris.

Cheers,

Michel

casuser has no shell so su is not possible. Anyway, there is no sign nowhere of sheduled logrotation job...

Review Cisco Networking for a $25 gift card