这些示例显示在 UNIX 和 Windows 上如何从工具运行瞬时事件列表。
以下例子显示了如何在随 Tivoli Netcool/OMNIbus 提供的“显示相关 FE 节点”工具中使用 nco_elct 实用程序。
$NCHOME/omnibus/bin/nco_elct -server "%server" -username "%username"
-password "%password" -vfile "$NCHOME/omnibus/desktop/default.elv"
-ftext "( RemoteNodeAlias != '' and RemoteNodeAlias = '@LocalNodeAlias' )
or ( LocalNodeAlias != '' and LocalNodeAlias = '@RemoteNodeAlias')
or Node = '@RemoteNodeAlias' or RemoteNodeAlias = '@Node'"
以下示例显示如何在随 Tivoli Netcool/OMNIbus 提供的“显示相关 FE 节点”(Windows)工具中使用 NCOelct.exe 实用程序。
"$(NCHOME)/omnibus/desktop/NCOelct.exe" -server "%server" -username "%username"
-password "%password" -vfile "$(NCHOME)/omnibus/ini/default.elv"
-elf "$(NCHOME)/omnibus/ini/tool.elf" -params "( RemoteNodeAlias != \\'\\'
and RemoteNodeAlias = \\'@LocalNodeAlias\\' )
or ( LocalNodeAlias != \\'\\' and LocalNodeAlias = \\'@RemoteNodeAlias\\')
or Node = \\'@RemoteNodeAlias\\' or RemoteNodeAlias = \\'@Node\\'"
tool.elf 文件(在前述 NCOelct 命令中引用) 具有以下内容:
filter_name = 'ToolFilter';
filter_text = '@FilterText';
filter_metric = 'avg(Severity)';
# End of file
工具中表述的 Windows NCHOME 环境变量的用法与常规用法(%NCHOME%)不同。造成此差异的原因在于变量是由内置工具解析器而不是由 Windows 操作系统进行解释和解析的。
从事件列表运行工具时,-params 选项后的整个字符串将替换 tool.elf 文件中的 @FilterText 占位符。 在 -params 字符串中,事件列表中当前选定事件中的值将替换 @LocalNodeAlias、@RemoteNodeAlias 和 @Node 占位符。