cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2150
Views
18
Helpful
15
Replies

Logs files in Ciscoworks.

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.

4 Accepted Solutions

Accepted Solutions

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

View solution in original post

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

View solution in original post

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').

View solution in original post

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

View solution in original post

15 Replies 15

Sven Hruza
Level 4
Level 4

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

Hi Sven,

Many thanks for your response.

I opened up thelogot.pl -c as you said, where in here do you locate the log file I want to configure.

To be honest, I'm lost.

Thanks

Anthony

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

Many many thanks Sven,

I finally got it working.

One more question, do I need to restart services to get this to work.

Anthony

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.

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

Worked like a Dream.

Thanks a million.

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.

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.

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').

Hi Martin,

I have attached the screen grab from Ciscowork and the conf file for the log settings. I have also setup logrot.pl as advised by Sven earlier on in the thread.

Any more ideas.

Much appreciated.

Anthony.

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

Hi Martin,

Does this look ok? It looks strange to me?

Its always the simpliest of things that are always the most complicated.

Many thanks for your help.

Anthony.

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 :-)

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco