05-19-2011 06:21 AM
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
05-19-2011 12:58 PM
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
05-19-2011 01:03 PM
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...
05-19-2011 03:35 PM
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.
05-19-2011 10:49 PM
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.
05-19-2011 10:53 PM
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
05-23-2011 02:39 AM
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?
05-23-2011 05:20 AM
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
05-23-2011 08:40 AM
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...
05-23-2011 12:44 PM
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
05-26-2011 01:24 AM
casuser has no shell so su is not possible. Anyway, there is no sign nowhere of sheduled logrotation job...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide