Logs files in Ciscoworks.

Answered Question
Aug 12th, 2008

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.

I have this problem too.
0 votes
Correct Answer by Martin Ermel about 8 years 3 months ago

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

Correct Answer by Martin Ermel about 8 years 3 months ago

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

Correct Answer by Sven Hruza about 8 years 3 months ago

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

Correct Answer by Sven Hruza about 8 years 3 months ago

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.8 (8 ratings)
Loading.
Sven Hruza Tue, 08/12/2008 - 01:43

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

Anthony O'Reilly Tue, 08/12/2008 - 04:43

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

Correct Answer
Sven Hruza Tue, 08/12/2008 - 05:01

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

Anthony O'Reilly Tue, 08/12/2008 - 05:19

Many many thanks Sven,

I finally got it working.

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

Anthony

Anthony O'Reilly Mon, 08/25/2008 - 00:56

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.

Correct Answer
Sven Hruza Mon, 08/25/2008 - 01:03

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

Anthony O'Reilly Wed, 08/27/2008 - 23:49

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.

Anthony O'Reilly Wed, 08/27/2008 - 23:43

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.

Correct Answer
Martin Ermel Thu, 08/28/2008 - 04:33

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

Anthony O'Reilly Fri, 08/29/2008 - 00:54

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.

Correct Answer
Martin Ermel Fri, 08/29/2008 - 04:55

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

Martin Ermel Fri, 08/29/2008 - 07:11

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

Sec IT Mon, 06/29/2009 - 03:20

Dear All,

it was extremely helpfull..I face the same problem but got answer in the last conversation as to change the value in logstat.conf, logstat.old.conf, logstat.orig etc.

No need to use perl command and get the command prompt hung.

issue is resolved..

Anyway thanks to the team for posting such a very good topic.

regards

Rajesh P

Actions

This Discussion