08-12-2008 12:05 AM
Good Morning,
THe following log files have exceeded the recommended size:
dmgtDbg.log
stdout.log
syslog.log
CSDiscovery.log
CVDeviceSelector.log
I am trying to get these log file to write to a new one when the log file reaches it recommended size. On the web, the reference a tool called LOGROT. I cannot find this tool on the servers.
Any ideas anyone?
Thanks a million
Anthony.
Solved! Go to Solution.
08-12-2008 05:01 AM
Okay, I try to explain...
Start logrot with
\MSROOT\bin>perl \MSROOT\bin\logrot.pl -c
Then you get the following:
Logrot Configuration Menu
-------------------------
1. Edit variables
2. Edit log files
3. Quit and save changes
4. Quit without saving changes
Enter option:
There you can configure the logfiles under the option 2.
Under option 1 you can edit the path where you will save the old logfiles.
Enter 2.
Warning: No logfiles found.
a. Add logfile(s)
d. Delete logfile(s)
q. Go back
Enter option or logfile number to edit:
To add a new logfile enter a.
Then follow the configuration:
Enter logfile path []: \MSROOT\log\CSDiscovery.log
Enter number of archives to keep [0]: x
Enter maximum file size (in kilobytes) [1024]: xy
Compression extension (Z,bz2,gz):
Number Logfile Name Number of Archives Max Size Compress
-----------------------------------------------------------------------------
1. \MSROOT\log\CSDiscovery.log x xy
a. Add logfile(s)
d. Delete logfile(s)
q. Go back
Good luck ;)
Sven
08-25-2008 01:03 AM
Hi!
I forgot something...sry!
You have to create a job which execute logrot.pl once a day or something.
I created a file named logrot.bat and put the string into to start logrot.pl
\MSROOT\CSCOpx\bin\perl \MSROOT\CSCOpx\bin\logrot.pl -v
With the scheduler you can plan the job.
Sven
08-28-2008 04:33 AM
these settings are made in
NMSROOT/conf/logstat.conf
the values in this file are in bytes (with 1Kbyte = 1024 bytes);
just change the values and save the file; any logfile using more then 90% of the 'Recommended Size Limit' will be in red letters.
to see the changes, open Common Service > Server > Reports > Log File Status ==> Generate Report
per default it took 5 min to see the update in the portal view ('Log Space Usage').
08-29-2008 04:55 AM
Hi Anthony,
that is OK. The value in the file is in Bytes whereas the GUI shows KBytes. With 1KByte being 1024 Byte you get the following calculation:
1024 Byte x 1024 = 1048576 Byte
1024 BYte x 1048576 = 1073741824 Byte
or generally speaking
1024 Byte x Recommended Size Limit (KByte) = Value in logstat.conf (Byte)
The log files being red exceed the Recommended Size Limt.
For dmgtDbg.log you could enter a recommende Size Limit of 300 000 KByte which would be
1024 x 300 000 = 30307200000
in logstat.conf
08-12-2008 01:43 AM
Hi!
I think you can use the perl-script C:\Program Files\CSCOpx\bin\logrot.pl for backup logfiles.
To configure it use
C:\Progra~1\CSCOpx\bin\perl C:\Progra~1\CSCOpx\bin\logrot.pl -c
Sven
08-12-2008 04:43 AM
08-12-2008 05:01 AM
Okay, I try to explain...
Start logrot with
\MSROOT\bin>perl \MSROOT\bin\logrot.pl -c
Then you get the following:
Logrot Configuration Menu
-------------------------
1. Edit variables
2. Edit log files
3. Quit and save changes
4. Quit without saving changes
Enter option:
There you can configure the logfiles under the option 2.
Under option 1 you can edit the path where you will save the old logfiles.
Enter 2.
Warning: No logfiles found.
a. Add logfile(s)
d. Delete logfile(s)
q. Go back
Enter option or logfile number to edit:
To add a new logfile enter a.
Then follow the configuration:
Enter logfile path []: \MSROOT\log\CSDiscovery.log
Enter number of archives to keep [0]: x
Enter maximum file size (in kilobytes) [1024]: xy
Compression extension (Z,bz2,gz):
Number Logfile Name Number of Archives Max Size Compress
-----------------------------------------------------------------------------
1. \MSROOT\log\CSDiscovery.log x xy
a. Add logfile(s)
d. Delete logfile(s)
q. Go back
Good luck ;)
Sven
08-12-2008 05:19 AM
Many many thanks Sven,
I finally got it working.
One more question, do I need to restart services to get this to work.
Anthony
08-25-2008 12:56 AM
Hi Sven,
THe Ciscowork server is still stating that the logs are too big, do I need to restart logrot or any other service.
Your help will be much appreciated.
Thanks
Anthony.
08-25-2008 01:03 AM
Hi!
I forgot something...sry!
You have to create a job which execute logrot.pl once a day or something.
I created a file named logrot.bat and put the string into to start logrot.pl
\MSROOT\CSCOpx\bin\perl \MSROOT\CSCOpx\bin\logrot.pl -v
With the scheduler you can plan the job.
Sven
08-25-2008 01:51 AM
Worked like a Dream.
Thanks a million.
08-27-2008 11:49 PM
08-27-2008 11:43 PM
Hi Sven,
Just more one thing.
I ran the scheduled job and it ran fine. THe warnings on the system page are gong e but on the On the Log Space Usage section it still says the log file bigger than the recommended size.
How do you resolve this?
Thanks again,
Anthony.
08-28-2008 04:33 AM
these settings are made in
NMSROOT/conf/logstat.conf
the values in this file are in bytes (with 1Kbyte = 1024 bytes);
just change the values and save the file; any logfile using more then 90% of the 'Recommended Size Limit' will be in red letters.
to see the changes, open Common Service > Server > Reports > Log File Status ==> Generate Report
per default it took 5 min to see the update in the portal view ('Log Space Usage').
08-29-2008 12:54 AM
08-29-2008 04:55 AM
Hi Anthony,
that is OK. The value in the file is in Bytes whereas the GUI shows KBytes. With 1KByte being 1024 Byte you get the following calculation:
1024 Byte x 1024 = 1048576 Byte
1024 BYte x 1048576 = 1073741824 Byte
or generally speaking
1024 Byte x Recommended Size Limit (KByte) = Value in logstat.conf (Byte)
The log files being red exceed the Recommended Size Limt.
For dmgtDbg.log you could enter a recommende Size Limit of 300 000 KByte which would be
1024 x 300 000 = 30307200000
in logstat.conf
08-29-2008 05:36 AM
08-29-2008 07:11 AM
Hi Anthony,
I think you are right and the realy hard thing with this calculation is to get the result of 30307200000 if you have 1024 * 300 000
surely it is 1024 * 300 000 = 307200000
I would say the first was a typo ...
otherwise it would be a little embarrasing :-)
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