nsr_render_log reads messages from the NetWorker raw log file, filters and renders them according to the command line options, and sends the output to stdout. The default language is English. If a locale is specified, the messages are output in the specified language, and the time stamps are formatted to that locale. If the messages cannot be rendered in the specified locale language then the messages are rendered in English. nsr_render_logs assumes that the proper fonts are configured by the user.
Logs files rendering cane be done on screen, send to a file and send to file in background
- Render raw file on screen:
- nsr_render_log raw_filename
- Render raw file to a text file:
- nsr_render_log raw_filename > output_filename
- Render raw file to a text in background:
- nsr_render_log raw_filename 1> output_filename 2>&1
- Render a .raw file from a remote machine:
- nsr_render_log -R hostname raw_filename 1> output_filename 2>&1
- Render a .raw file and only view log file messages for a specific device:
- nsr_render_log -F devicename raw_filename 1> output_filename 2>&1
- Render only the most recently logged messages:
- nsr_render_log -B number raw_filename 1> output_filename 2>&1
EXAMPLES:
To render log messages generated by pid s 41, 1064 and 1065, suppressing thread and activity/eventID output, searching only the last 50 lines of the log file and redirect output
nsr_render_log -ta -P "41 1064 1065" -B -50 ./recover.raw > recover.txt
To render first 99 log messages between 11:00 AM and 12:00 AM on Jan 30, 2006 with a severity level 2.
nsr_render_log -S "Jan 30 11:00" -E "Jan 30 12:00" -N 99 -Y 2 /nsr/logs/daemon.raw
Render whole daemon log to a file
nsr_render_log daemon.raw > daemon.log
Where:
raw_filename is the name of the unrendered file. For example, daemon.raw
output_filename is the name of the file to direct the output to
hostname is the name of the host that contains the .raw file.
devicename is the name of the device
number Output only messages starting with this line number. If the given start_line value is negative then it lines from the end of file.
-h suppresses the hostname
-y suppresses the message severity
The NetWorker Command Reference Guide provides detailed information about the nsr_render_log program and the available options.