NetWorker: How to Change the Size of Runtime-Rendered Logs
Summary: Use nsradmin command to change a particular NetWorker log setting.
Instructions
.raw logs in to .log files. This includes the conversion of epoch time to server (human readable) timestamps, error code, and host rendering.
This article focuses on the log rollover functionality, maximum number of log copies, and file sizes of runtime rendered logs.
The .raw logging is managed from a nsradmin prompt on the NetWorker system. From an elevated prompt on the NetWorker host, run: nsradmin -p nsrexecd
The logging configuration is checked by running: print type: nsr log
Example:
[root@nsr ~]# nsradmin -p nsrexecd NetWorker administration program. Use the "help" command for help, "visual" for full-screen mode. nsradmin> print type: nsr log type: NSR log; administrator: Administrators, root, "user=nsrnmc,host=nsr.amer.lan", "user=root,host=nsr.amer.lan"; owner: NetWorker; maximum size MB: 500; maximum versions: 10; runtime rendered log: ; runtime rollover by size: Disabled; runtime rollover by time: ; name: daemon.raw; log path: /nsr/logs/daemon.raw; ...
.raw logging is listed. For example, a NetWorker Management Console (NMC) server includes the gstd.raw. All hosts with NetWorker installed include a daemon.raw which is the log for all NetWorker services. By default, runtime rendering is not enabled and the NetWorker administrator must enable it. See article NetWorker: How to automatically render daemon.raw to daemon.log in real time
To set the log file you want to manage, run the following command from the nsradmin prompt:
. type: nsr log; name: LOG_NAME
. type: nsr log; name: daemon.raw
To enable runtime rendering of a log file, update the runtime rendered log value to direct to an .log file.
Linux example:
nsradmin> update runtime rendered log: /nsr/logs/daemon.log
runtime rendered log: /nsr/logs/daemon.log;
Update? y
updated resource id 14.0.82.32.0.0.0.0.244.130.220.103.192.168.9.150(2)
nsradmin> update runtime rendered log: "C:\\Program Files\\EMC NetWorker\\nsr\\logs\\daemon.log"
runtime rendered log: \
"C:\\Program Files\\EMC NetWorker\\nsr\\logs\\daemon.log";
Update? y
updated resource id 8.0.136.23.0.0.0.0.125.191.185.104.192.168.0.5(5)
NOTE: The
\ must be properly escaped on Windows. This is why the path includes double backslash (\\) for file paths. Also, if the path includes any spaces, it must be enclosed in double quotes "PATH" as shown above.
To enable runtime rollover by size, enter the following command:
nsradmin> update runtime rollover by size: Enabled
runtime rollover by size: Enabled;
Update? y
updated resource id 14.0.82.32.0.0.0.0.244.130.220.103.192.168.9.150(3)
The default configuration rolls over the .log file once it reaches 500 MB and retains 10 copies. These values can also be updated as per your discretion:
nsradmin> update maximum size MB: 100
maximum size MB: 100;
Update? y
updated resource id 14.0.82.32.0.0.0.0.244.130.220.103.192.168.9.150(4)
nsradmin> update maximum versions: 5
maximum versions: 5;
Update? y
updated resource id 14.0.82.32.0.0.0.0.244.130.220.103.192.168.9.150(5)
nsradmin>
A NetWorker service restart is required for the changes to take affect.
nsr_shutdown ; systemctl start networker
Windows NetWorker client, storage node, NMC server (only):
net stop nsrexecd /y && net start nsrexecd
Windows NetWorker Server:
net stop nsrexecd /y && net start nsrd
Windows NetWorker Management Console (NMC) (after performing above):
net start gstd
When the NetWorker services start, a rendered .log file is generated. Example:
[root@nsr ~]# ls -l /nsr/logs/daemon.log -rw-r--r--. 1 root root 21750 Sep 16 13:10 /nsr/logs/daemon.log
NOTE: Enabling runtime rendering does not disable the
.raw logging. Both an .raw (unrendered) copy and .log (rendered) copy of the log exist simultaneously.
Additional Information
nsrladb folder is renamed. These settings are removed. When the nsrladb folder is renamed, a new nsrladb is created on the next service startup. The newly created nsrladb is re-created with default settings which does not include runtime rendering of .raw files.