Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products

NetWorker:如何使用nsr_render_log呈现.raw日志文件

Summary: 如何使用nsr_render_log收集日志。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

nsr_render_log 从 NetWorker 原始日志文件中读取消息,根据命令行选项筛选和呈现消息,然后将输出发送到 stdout。默认语言为英语。如果指定了区域设置,则将以指定的语言输出消息,并将时间戳格式化为该区域设置。如果无法以指定的本地语言呈现消息,则消息将以英语呈现。

日志文件渲染可以在屏幕上完成,发送到文件,然后发送到后台的文件。
  • 在屏幕上渲染原始文件:
nsr_render_log raw_filename
  • 将原始文件渲染为文本文件:
nsr_render_log raw_filename > output_filename
  • 在后台将原始文件渲染为文本:
nsr_render_log raw_filename > output_filename 2>&1
  • 从远程计算机渲染原始文件:
nsr_render_log -R hostname raw_filename > output_filename 2>&1
  • 呈现原始文件,并且仅查看特定设备的日志文件消息:
nsr_render_log -F devicename raw_filename > output_filename 2>&1
  • 仅呈现最近记录的消息:
nsr_render_log -B number raw_filename > output_filename 2>&1
  • 呈现来自指定时间范围的消息:
nsr_render_log -S "start_timestamp" -E "end_timstamp" raw_filename 1> output_filename 2>&1

其中:
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 the file.

-h suppresses the hostname.

-y suppresses the message severity.

示例:

将整个守护程序日志呈现到文件中。
nsr_render_log daemon.raw > daemon.log
仅呈现今天的日志消息:
nsr_render_log -S "today" daemon.raw > daemon.log 2>&1
仅呈现上周的日志消息
nsr_render_log -S "1 weeks ago" daemon.raw > daemon.log 2>&1

可以使用小时、天、周等应用逻辑。

呈现两个时间戳之间的日志消息:

nsr_render_log -S "08/13/2024 09:00:00 AM" -E "08/13/2024 10:00:00 AM" daemon.raw > daemon.log 2>&1
呈现由进程 ID (PID) 41、1064 和 1065 生成的日志消息,抑制线程和活动/事件 ID 输出,仅搜索日志文件的最后 50 行并重定向输出。
nsr_render_log -ta -P "41 1064 1065" -B -50 recover.raw > recover.txt
显示帮助消息:
nsr_render_log -h
NetWorker 命令参考指南提供了有关 nsr_render_log 程序和可用选项。NetWorker 文档可通过 戴尔支持获得。

Additional Information

Affected Products

NetWorker, NetWorker Series

Products

NetWorker Family, NetWorker Series
Article Properties
Article Number: 000022793
Article Type: How To
Last Modified: 21 Sept 2024
Version:  6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.