HP

HP Systems Insight Manager 5.1 用户指南

简体中文
  发现和标识  |  管理 hosts 文件  |  hosts 文件扩展名   

hosts 文件扩展名

目录
索引
声明
简介
产品概述
入门
发现和标识
配置自动发现
配置自动发现常规设置
管理发现模板
手动添加系统
管理 hosts 文件
新建 hosts 文件
编辑 hosts 文件
删除 hosts 文件
将 hosts 文件中的系统添加到 HP SIM 数据库
创建任务以导入用于 HP SIM 集成的 hosts 文件
通过 CLI 批量添加系统
hosts 文件扩展名
IP 范围
标识
管理系统类型
用户和授权
目录服务
联网和安全性
监视系统、群集和事件
存储集成
通过任务进行管理
扩展管理的工具
合作伙伴应用程序
报告
管理系统和事件
故障排除
参考信息
打印版本
词汇表
使用帮助
 缺省值

通常情况下,hosts 文件包含 IP 地址、系统名、系统别名和用户注释。创建的 hosts 文件可以包含有关系统的其他信息。该信息显示为一个或多个注释,这些注释位于系统的 hosts 文件条目之前。除非指定了其他值,否则将使用缺省值。为下列参数提供了缺省值:

参数关键字
系统类型TYPE
SNMP 超时SNMP_TIM
SNMP 重试次数SNMP_RET
SNMP 读取社区SNMP_MON
SNMP 写入社区SNMP_CON

可以修改 hosts 文件,以某个值替换一个条目的缺省值或更改所有后续条目的缺省值。要更改 hosts 文件中单个系统条目的值,请向 hosts 文件中的主机条目之前添加一个语句作为该行的注释,如以下示例所示。该语句应用于其后的系统,并仅应用于该系统。在以下示例中,缺省 TYPE 更改为系统 EngProliant 的服务器。

关键字语句hosts 文件条目
#$IMXE:< 关键字=值> #$IMXE: TYPE=server
例如:#$IMXE: TYPE=server16.26.176.92 EngProliant.compaq.com EngProliant #user comments

要全局性地更改缺省值,使其影响下一个文件条目和所有后续条目,请使用类似于以下示例的语句。将缺省值更改为下一个条目的路由器。路由器将为所有条目保留缺省值,直到另一个 #$IMXE_DEFAULT 语句更改了该值。如果 #$IMXE 语句更改了 TYPE 的单个实例,则不会仅对下个条目使用缺省值,然后恢复为路由器。

关键字语句hosts 文件条目

#$IMXE_DEFAULT: < 关键字=值>

#$IMXE_DEFAULT: TYPE=router

例如:#$IMXE_DEFAULT: TYPE=router

16.26.176.92 BldRtr6.compaq.com BldRtr6 #user comments

如果在带注释的条目上省略关键字参数,则将使用当前的缺省值。当前缺省值始终是标准缺省值,除非使用 #$IMXE_DEFAULT 语句设置了新的缺省值。对于包含多个字的关键字(如“management processor”),请用双引号将完整的关键字括起来。对于单个关键字,例如“server”,引号是可选的。

hosts 文件中引用的以下文本说明了多个语句。以井号 (#) 开头的说明不会显示在 hosts 文件中。

# Title: Systems in database # Sorted by: IP address # Date: 28-Mar-00 2:29:31 PM # Author: administrator The system EngProliant uses all current defaults.There are no additional comments. 16.26.176.92 EngProliant.compaq.com EngProliant #user comments The system testServer in the following example defaults for TYPE. The defaults for SNMP Timeouts and Retries were restored for this system but only apply to testServer.The SNMP write community string default was changed and only applies to testServer. #$IMXE: TYPE=Server #$IMXE: SNMP_TIM=0 SNMP_RET=0 SNMP_MON=public SNMP_CON=private 16.26.160.20 testServer.compaq.com testServer All defaults in the following example for the system BldRtr1 are the same as for testServer, but had to be specified because they are not the global defaults.These changes apply only to BldRtr1. #$IMXE: TYPE=Router #$IMXE: SNMP_TIM=0 SNMP_RET=0 SNMP_MON=public SNMP_CON=private 16.26.160.23 BldRtr1.compaq.com BldRtr1 For the system BldRtr5, the TYPE and protocols used for discovery were changed from the current defaults.Because the remaining keyword entries are missing, the standard defaults are applied for the SNMP timeouts, retries, and community strings. #$IMXE: TYPE=Router 16.26.160.24 BldRtr5.compaq.com BldRtr5 For the system AcctServer, only the TYPE was changed from the current defaults. #$IMXE: TYPE=Server 16.26.176.36 AcctServer.compaq.com AcctServer #user comments The global default for TYPE was changed from Unknown to Router. All subsequent entries will be identified as routers until a TYPE statement is used to specify another type or restore the default. #$IMXE_DEFAULT: TYPE=Router 16.25.176.38 FloorRtr2a.compaq.com FloorRtr2a #user comments The default for the next host entry was changed to management processor, which is enclosed in quotes.#$IMXE: TYPE="Management Processor" AcctSvriLo.compaq.com 16.25.176.37 AcctSvriLo #user comments ...

缺省值

如果 hosts 文件中缺少参数,则将应用缺省值。

关键字说明
TYPE

Application、Cluster、Complex、Desktop、Enclosure、Environmental Monitor、Handheld、Hub、KVM Switch、Management Processor、Notebook、Partition、Power Distribution Unit、Power Supply、Printer、Rack、Resource Partition、Remote Access Device、Router、Server、Shared Resource Domain、Storage Device、Switch、Tape Library、Thin Client、UPS、Unknown、Unmanaged 和 Workstation

有关每个系统类型的详细信息,请参阅配置自动发现 - 系统类型

Unknown(缺省值)
DMI

0

1

禁用(缺省值)

启用

SNMP

0

1

禁用(缺省值)

启用

HTTP

0

1

禁用(缺省值)

启用

SNMP_TIM

0

大于 0

系统缺省(缺省值)

SNMP_RET

0

大于 0

系统缺省(缺省值)

SNMP_MON

Public

<Community String>

只读(缺省值)

SNMP_CON

<Community String>

无缺省值

相关步骤

 发现和标识 - 管理 hosts 文件

相关主题

 HP Systems Insight Manager 5.1 用户指南 - 发现和标识