nsr_render_log(8)
nsr_render_log(8)
NAME
nsr_render_log - output NetWorker log file data in human-readable form
SYNOPSIS
nsr_render_log
[ -acdeghlmprty ] [ -L locale ] [ -S start_time | "l
locale_start_time" ] [ -E end_time | "l locale_end_time" ] [ -N
number_of_lines ] [ -x export_spec ] [ -T thread_id ] [ -P pro-
cess_id ] [ -G program_name ] [ -B start_line ] [ -M message_id
] [ -H hostname ] [ -J hostname_referenced ] [ -A activity_id ]
[ -C category ] [ -F devicename ] [ -Y severity ] log_file_name
DESCRIPTION
nsr_render_log reads messages from the NetWorker log file log_file_name
, 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 can-
not 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.
OPTIONS
-a Do not output the activity ID.
-c Do not output the category.
-d Do not output the timestamp.
-e Do not output the error number.
-g Do not output the program name.
-h Do not output the host name.
-l Output the header information line before the log output.
-m Do not output the message ID.
-p Do not output the process ID.
-r Do a catalog look up on a remote host and need to be specified
along with -R option.
-t Do not output the thread ID.
-y Do not output the severity.
-z Obfuscate secure information. Hostnames, usernames and network
addresses shall be aliased.
-x <export_spec>
As an alternative to the default human-readable output format,
export_spec provides for a user defined output format separator.
The export-spec 'c<separator>' displays values separated by
<separator>. For example, 'nsr_render_log -x 'c \t'
<file_name>, will produce tab separated values.
-L locale
Output is translated, and time is formatted, to the specified
locale.
-S [ start_time | "l locale_start_time" ]
Messages dated earlier than start_time will not be output.
start_time shall use the nsr_getdate(3) format. The user can
specify an input locale date/time with an 'l' option. The input
locale date/time follows the format display of 'ls -l' command
of recover on UNIX and 'dir' command of recover on windows. For
example, in an English locale and on a UNIX machine 'nsr_ren-
der_log -S " l may 30 4:00 " <log_file_name>' will produce all
the messages dated later than May 30th 4:00. With the 'l' option
if no start time or an invalid start time is specified then the
time is mapped to the start of the day (00:00:00).
See changetime command in recover man page for more information
on the locale_date format supported.
-E [ end_time | "l locale_end_time" ]
Messages dated later than end_time will not be output.
start_time shall use the nsr_getdate(3) format. The user can
specify an input locale date/time with an 'l' option. The input
locale date/time follows the format display of 'ls -l' command
of recover on UNIX and 'dir' command of recover on windows. For
example, in an English locale and on a UNIX machine 'nsr_ren-
der_log -E " l may 30 4:00 " <log_file_name>' will produce all
the messages dated earlier than May 30th 4:00. With the 'l'
option if no end time or an invalid end time is specified then
the time is mapped to the end of the day (23:59:59).
See changetime command in recover man page for more information
on the locale_date format supported.
-N lines
The maximum number of lines that are required to be printed. If
there are not sufficient number of lines then the available num-
ber of lines shall be printed. If this option is specified
along with the Start time then N lines are rendered after the
Start time stamp.
-B start_line
Output only messages starting with this line number. If the
given 'start_line' value is negative then it will retrieve the
specified number of lines from the end of file.
-T thread_id
Output only messages written by the specified thread ID(s). Mul-
tiple TIDs up to a limitof 8 may be entered. Each shall be sepa-
rated by a space and the whole set enclosed within double
quotes.
-P process_id
Output only messages written by the specified process ID(s).
Multiple PIDs up to a limit of 8 may be entered. Each shall be
separated by a space and the whole set enclosed within double
quotes.
-G program_name
Output only messages written by the specified program name(s).
Multiple Program Names up to a limit of 8 may be entered. Each
shall be separated by a space and the whole set enclosed within
double quotes.
-M message_id
Output only messages having the specified message ID(s). Multi-
ple Message IDs up to a limit of 8 may be entered. Each shall be
separated by a space and the whole set enclosed within double
quotes.
-H hostname
Output only messages written by the specified host(s). Multiple
HostNames up to a limit of 8 may be entered. Each shall be sepa-
rated by a space and the whole set enclosed within double
quotes.
-A activity ID
Output only messages having the specified activity ID. Multiple
activity IDs up to a limit of 8 may be entered. Each shall be
separated by a space and the whole set enclosed within double
quotes.
-C category
Output only messages having the specified message category. Mul-
tiple message categories up to a limit of 8 may be entered. Each
shall be separated by a space and the whole set enclosed within
double quotes.
-F device name
Output only messages having a reference to the specified device
name. Multiple devie names up to a limit of 8 may be entered.
Each shall be separated by a space and the whole set enclosed
within double quotes.
-J host name referenced
Output only messages havinga reference to the specified host
name. Multiple host names up to a limit of 8 may be entered.
Each shall be separated by a space and the whole set enclosed
within double quotes.
-Y severity
Output only messages having a severity level equal to or more
than the specified severity level.
log_file_name
Read messages from the file named by the path name log_file_name
EXAMPLES
Example 1: To translate log to Japanese, with a header line and obfus-
cation.
nsr_render_log -lz -L ja_JP.utf8 /nsr/logs/daemon.raw
Example 2: 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
Example 3: To render first 99 log messages between 11:00 AM and 12:00
AM on Jan 30, 2006 with a security level 2.
nsr_render_log -S "Jan 30 11:00" -E "Jan 30 12:00" -N 99 -Y 2
/nsr/logs/daemon.raw
NOTES
1: For each backslash ( " \ " ) character in the path, enter two back-
slashes in succession.
Example: c:\\dir_one\\dir_two\\daemon.raw
2: If the user is rendering the messages to a locale other than the
locale of the shell, then the output will be UTF-8 encoded. If this
UTF-8 output is piped to a file, then it is the responsibility of the
user to make sure that the file supports UTF-8 encoding.
SEE ALSO
nsr_getdate(3)
NetWorker 7.6.2 Jul 14, 11 nsr_render_log(8)