Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Logs Exceeds the size limit,

Hi Friends,

I have an issue with the logs which get exceed the size limit such as CVDeviceselector.log,CSDiscovery.log,jrm.log,I have read the user guide CS3.1 Maintaining the log files but am not sure that the logrot file which am editing is correct as per the instruction.Am using LMS 3.0.1 and CS3.1.

What i understand from configuring logrot is what i have configured in attachment document. Please refer to attachments

Thanks

Maintaining Log Files On Windows

To maintain log files on Windows:

Step 1 Make sure the new location has sufficient disk space.

Step 2 Go to the command line and make sure you have the correct permissions.

Step 3 Stop all processes by entering:

net stop crmdmgtd

Step 4 Perform log maintenance by running logrot.

See Configuring Logrot and Running Logrot for more information.

Step 5 Verify the procedure was successful by examining the contents of the log files in the following location:

NMSROOT\log\

Only log files that reach 90% of their size limits are backed up, and the original log file is emptied.

Step 6 Restart the system by entering:

net start crmdmgtd

Step 7 Select Server > Reports > Log File Status to view your log changes.

Using Logrot

The Logrot utility helps you manage the log files in a better fashion.

Logrot is a log rotation program that can:

• Rotate log when CiscoWorks is running.

• Optionally archive and compress rotated logs.

• Rotate log only when it has reached a particular size.

Logrot helps you add new files easily. Logrot should be installed on the same machine where you have

installed Common Services.

4-96

User Guide for CiscoWorks Common Services

OL-11776-01

Chapter 4 Configuring the Server

Administering Common Services

Configuring Logrot

To configure Logrot:

Step 1 Enter NMSROOT\bin\perl.exe NMSROOT\bin\logrot.pl -c (on Windows)

Step 2 Run /opt/CSCOpx/bin/logrot.pl -c (on Solaris)

The Logrot configuration menu appears. You have the following options:

• Edit variables.

• Edit log files.

• Quit and save changes.

• Quit without saving change.

Step 3 Select Edit variables to set your Backup Directory.

If you do not set a backup directory, each log will be rotated in its current directory.

Step 4 Select Edit log files to add log files you wish Logrot to rotate.

You can specify log files using fully-qualified or relative paths. If a relative path is specified, and the log

file does not exist in that path, the default log file path for your operating system will be added during

rotation (for example, /var/adm/CSCOpx/log on Solaris).

Step 5 Specify the number of archive revisions. If you do not want to keep any archives, enter 0 (the default)

for this option.

Step 6 Specify the maximum file size. The log will not be rotated until this size is reached. The unit is in

kilobytes (KB). The default is 1024 KB or 1 MB.

Step 7 Specify the file compression type to be used. It can be:

• Z-UNIX

• gz-GNU gzip (available by default on Windows only)

• bz2-bzip2 (available by default on Solaris8 and above only).

When deleting logfiles, you can choose to delete an individual file, a list of files, or all files matching a

certain pattern.

For example, 1-3 means delete files numbered 1 through 3. a list of comma-separated file numbers, for

example, 1,21, means delete files numbered 1 and 21. A pattern string *.log means delete all files that

match the pattern *.log.

You can also specify the special pattern, *, which means delete all logfiles in the configuration.

Running Logrot

To run Logrot enter:

• On Windows:

Enter NMSROOT\bin\perl NMSROOT\bin\logrot.pl

• On Solaris:

Run /opt/CSCOpx/bin/logrot.pl

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: Logs Exceeds the size limit,

First, the log file name is jrm.log, not jrm. Second, restarting Daemon Manager does not run logrot. After you configure logrot, run:

D:\progra~1\cscopx\bin\perl D:\progra~1\cscopx\bin\logrot.pl -s

That will shutdown Daemon Manager, rotate the logs, then restart Daemon Manager.

7 REPLIES
Cisco Employee

Re: Logs Exceeds the size limit,

Why are you modifying logrot.pl? You should NEVER touch any of the code in LMS. Restore the original logrot.pl.

From the command line, run:

NMSROOT\bin\perl NMSROOT\bin\logrot.pl -c

This will launch the logrot configuration menu. You can then add log files per the documentation in the online help.

To schedule logrot, use the Windows AT command. For example, to run logrot daily at 1:00 AM:

at 01:00 /every:M,T,W,Th,F,S,Su NMSROOT\bin\perl NMSROOT\bin\logrot.pl

Where NMSROOT is the path into which LMS is installed.

New Member

Re: Logs Exceeds the size limit,

Hi clarke,

My CW LMS is installed in

D:program files\CSCOpx so my path in command prompt shld be as below:

D:\program files\CSCOpx\bin\perl d:\program files\bin\logrot.pl -c all this shld be in 1 row,still am confuse to understand NMSROOT\bin\perl NMSROOT\bin\logrot.pl -c command can u write for me as i have mentioned above my LMS location.

I remember once i tried by entering only

D:\program files\CSCOpx\bin\perl it stucks there for hours and hours no reponse only the cursor blinks.

Clark help me i was expecting ur call and i received ur reply.

Thanks,

Cisco Employee

Re: Logs Exceeds the size limit,

The command is:

D:\progra~1\cscopx\bin\perl D:\progra~1\CSCOpx\bin\logrot.pl -c

New Member

Re: Logs Exceeds the size limit,

Hi Clark,

Actually It is strange for me to excecute 2 times the same path

D:\progra~1\cscopx\bin\perl D:\progra~1\CSCOpx\bin\logrot.pl -c

so i requested u to b more specific.Thanks the command is working i asked the helpdesk guy to execute the command it's fine,I will do the changes tomorrow and mail u the result,At present Am @ home.

Appreciate ur call.

Thanks once more.

New Member

Re: Logs Exceeds the size limit,

Hi Clark,

step 3:edit variables

i specified d:\logsbackup

step 4:edit log files

i addedd the log file path shown in above attachment for jrm

d:\program files\cscopx\log\jrm

step 5:No of archives

i specified 50

step 6:maximum size

i set as default to 1024

step 7: compression

i specified windows default gz

and then q to go back

enter option:3 for quit and save changes

i did in proper way and then i stop the CW services by net stop crmdmgtd and then started again net start crmdmgtd but it does'nt work.

Thanks,

Cisco Employee

Re: Logs Exceeds the size limit,

First, the log file name is jrm.log, not jrm. Second, restarting Daemon Manager does not run logrot. After you configure logrot, run:

D:\progra~1\cscopx\bin\perl D:\progra~1\cscopx\bin\logrot.pl -s

That will shutdown Daemon Manager, rotate the logs, then restart Daemon Manager.

New Member

Re: Logs Exceeds the size limit,

Hi Clark,

i got the Success clark,

D:\progra~1\cscopx\bin\perl D:\progra~1\cscopx\bin\logrot.pl -s

I didnt find the above command in user guide CS 3.1.As i have posted in previous mail.The only difference between 2 commands is -c and -s. First i checked with jrm.log and 2nd with jrm but nothing happen.i was missing the above mail command.

C u in the next question soon am mailing.

Where i can write about u on cisco website can u give me any path.

Thanks clark u r genious.

441
Views
0
Helpful
7
Replies