Start a Conversation

Unsolved

This post is more than 5 years old

4664

November 21st, 2012 02:00

Logrotate NSR logfiles

Hey guys,

I wanna set up logrotate for the networker logfiles. My logfiles are so big, it's unhandable.

What networker logfiles are important? Daemon.raw, daemon.log and savegroup.log? There is also a file named messages in /nsr/logs which seems like the same like savegroup.log.

Has anyone implemented a logrotate job for networker?

Regards,

Jan

445 Posts

November 21st, 2012 03:00

JayJay9882,

Log rotation in Networker has been a contentious issue for some time now and even in the latest version it has not been changed which is disappointing. you can limit the size of the logs produced and how many logs you wish to keep but there are two main drawbacks to the process: -

1. You have to stop the NetWorker software for the rotation to take effect.

2. I do not believe that messages or savegrp logs are included in the current log rotation offering.

There are articles on Powerlink but if you cannot find I will send reference/details for which variables etc to set

Regards,

Bill Mason

544 Posts

November 21st, 2012 03:00

Hi Jan,

The daemon.raw os the main log file for NetWorker, you can imit its size by changing the NSR_MAXLOGSIZE attribute, for more information please check the following KB article:

http://solutions.emc.com/emcsolutionview.asp?id=esg53730

Kindly noted that after changing this attribute the action is only taken when the NetWorker software is stopped, on startup the log files will be cycled from .raw to .001 , .002 , etc , if the log size is greater than the set size. Meaning if you set the max log size to 10 MB and you didnt stop the NetWorker services for a long time, you may find the daemon.raw size exceed the 10 MB and became larger than expected, once you stop the services, the daemon.raw will be cycled to daemon.001 and a new daemon.raw will be created once the service started.

In NetWorker 8.0 , there is a new environment variable provides automatic rollover and truncation in real time of the daemon.raw and gstd.raw files when these files exceed the maximum defined size as the NSR_MaxLogSize. You can find more information in NetWorker 8.0 Admin guide.

Hope this helps you.

Ahmed Bahaa

2 Intern

 • 

14.3K Posts

November 21st, 2012 13:00

Without stopping NW, do following:

cp -p /nsr/logs/daemon.raw /nsr/logs/daemon_DATEHERE.raw; > /nsr/logs/daemon.raw;gzip /nsr/logs/daemon_DATEHERE.raw

Above has small caveat that data between copy and nulling it will be lost so yoy may wish to do that during idle time (note that if you do mv instead and then touch for daemon.raw you will also have to HUP syslogd).

23 Posts

November 21st, 2012 14:00

NetWorker 8.0 (the latest release) has a new resource called NSR Log which allows you to configure log rotation on a number of criteria.  You can do size and time.   It is off by default but if enabled can be done in flight against a running NW server.

The NW 8.0 AG on page 571 details the config settings via nsradmin.    It covers daemon and gstd log files.  

As for rotating savegrp logs, the need is somewhat lessened in NW 8.0.   The new nsrsgrcomp command builds savegrp reports on demand.    The old nsr/tmp/sg infrastructure is gone and the overhead of keeping logs is somewhat remedied.

2 Intern

 • 

14.3K Posts

November 21st, 2012 14:00

I don't plan to adopt NW8 before Q3 next year, but it is good to hear that rotation is now done live (for example my daemon log usually grows 500MB per week and I usually get to stop NW every few months for reasons outside NW realm).

161 Posts

November 22nd, 2012 08:00

Thanks for your answers, folks!

No Events found!

Top