下表标识导入和导出实用程序处理的拓扑数据。
每个域、组和主机的相关记录信息。
域和组的相关修饰信息。修饰信息只包含版式和背景索引,而不包括背景内容。例如,背景信息只包含 GIF 文件名,不包括 GIF 文件。
关系信息说明拓扑分层结构、实体背景和版式。
导入/导出文件用于说明导入/导出数据。可以使用文本编辑器对其进行编辑。该文件包括拓扑分层结构中每个实体的相关信息。由于附加导出模式可以在文件中附加更多的对象信息,因此文件格式很容易扩展和分析。导出文件保存为 XML 格式。
文件分成四部分:
指示信息
DTD (文档类型说明)
标题信息
数据块
指示信息用于标识文件是 XML 格式的文件。该信息通常按如下方式显示:
<? XML version = 1.0 ?> |
DTD 信息定义了文档的结构。导出文件的 DTD 类似于下面的示例。
<!ELEMENT ENTITY (ENTITY* ADORNMENT*)> /* Entity element describes a entity. If it is a group, it may contain groups and adornment. */ <!ATTLIST ENTITY /* Entity attributes */ desc CDATA full_desc CDATA hostname CDATA ip CDATA netmask CDATA architecture CDATA family CDATA polling_type CDATA url CDATA x_coord CDATA y_coord CDATA topology_type CDATA event_dest CDATA trap_dest CDATA target_host CDATA target_ip CDATA read_info CDATA write_info CDATA> <!ELEMENT ADORNMENT> <!ATTLIST ADORNMENT x_coord CDATA y_coord CDATA type CDATA configuration CDATA> ]> |
头信息用于记录一般信息,例如:
用户
数据
版本
平台
产品
数据块包含拓扑分层结构和实体。
下面的图例说明了 My New 域的拓扑。

该示例显示了 My New 域的拓扑导出文件。
<?xml version="1.0" encoding="UTF-8"?>
<DOCUMENT>
<HEAD>
<USER>jkang</USER>
<DATE>1/7/1999</DATE>
<VALIDITY>7 days</VALIDITY>
<PRODUCT>Sun Management Center</PRODUCT>
<VERSION>3.6</VERSION>
<COMMENTS>This is an example.</COMMENTS>
</HEAD>
<DOMAIN name="my new">
<ENTITY arch="SunOS 5.8" config="" desc="wizard" entityId="e-1"
family="sun4u-Sun-Ultra-2" fulldesc="wizard" hostname="wizard"
ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false"
netMask="255.255.255.0" pollType="ahost" readInfo="" targetHost=""
targetIp="" targetUrl="snmp://129.158.168.63:1100/sym//base/mibman/modules"
type="" writeInfo="" xCoord="23" yCoord="39"
/>
<ENTITY arch="SunOS 5.8" config="" desc="atom" entityId="e-2"
family="sun4u-Sun-Ultra-2" fulldesc="" hostname="u30-1"
ipAddr="129.158.168.113" isPoll="false" isSoftGroupLink="false"
netMask="255.255.255.0" pollType="ahost" readInfo=""
targetHost="" targetIp=""
targetUrl="snmp://129.158.168.113:161/sym//base/mibman/modules"
type="" writeInfo="" xCoord="75" yCoord="39"
/>
<ENTITY arch="" config="" desc="campus" entityId="e-3" family="campus-view"
fulldesc="" hostname="" ipAddr="" isPoll="true" isSoftGroupLink="false"
netMask="" pollType="aview" readInfo="espublic" targetHost="" targetIp=""
targetUrl="snmp://129.158.168.63:164/mod/topology+view-101"
type="" writeInfo="" xCoord="27" yCoord="111">
<ENTITY arch="" config="" desc="building" entityId="e-1"
family="building-view" fulldesc="" hostname="" ipAddr=""
isPoll="true" isSoftGroupLink="false" netMask="" pollType="aview"
readInfo="espublic" targetHost="" targetIp=""
targetUrl="snmp://129.158.168.63:164/mod/topology+view-102"
type="" writeInfo="" xCoord="" yCoord="">
<ENTITY arch="SunOS 5.8" config="" desc="Wizard" entityId="e-1"
family="sun4u-Sun-Ultra-2" fulldesc="" hostname="wizard"
ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false"
netMask="255.255.255.0" pollType="ahost" readInfo=""
targetHost="" targetIp=""
targetUrl="snmp://129.158.168.63:1100/sym//base/mibman/modules"
type="" writeInfo="" xCoord="" yCoord=""
/>
<ENTITY arch="SunOS 5.8" config="" desc="aaa" entityId="e-2"
family="sun4u-Sun-Ultra-2" fulldesc="" hostname="wizard"
ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false"
netMask="255.255.255.0" pollType="ahost" readInfo=""
targetHost="" targetIp=""
targetUrl="snmp://129.158.168.63:1100/sym//base/mibman/modules"
type="" writeInfo="" xCoord="" yCoord=""
/>
<ENTITY arch="SunOS 5.8" config="" desc="atom" entityId="e-3"
family="sun4u-Sun-Ultra-2" fulldesc="" hostname="u30-1"
ipAddr="129.158.168.113" isPoll="false" isSoftGroupLink="false"
netMask="255.255.255.0" pollType="ahost" readInfo=""
targetHost="" targetIp=""
targetUrl="snmp://129.158.168.113:161/sym//base/mibman/modules"
type="" writeInfo="" xCoord="" yCoord=""
/>
</ENTITY>
</ENTITY>
<ENTITY arch="" config="" desc="129.158.0.0" entityId="e-4"
family="network-view" fulldesc="129.158.0.0" hostname="129.158.0.0"
ipAddr="129.158.0.0 isPoll="true" isSoftGroupLink="false"
netMask="255.255.255.0" pollType="aview"
readInfo="espublic" targetHost="129.158.0.0" targetIp="129.158.0.0"
targetUrl="snmp://129.158.168.63:164/mod/topology+view-103" type=""
writeInfo="" xCoord="38" yCoord="181">
<ENTITY arch="" config="" desc="129.158.168.0" entityId="e-1"
family="subnetwork-view" fulldesc="129.158.168.0"
hostname="129.158.168.0" ipAddr="129.158.168.0"
isPoll="true" isSoftGroupLink="false" netMask="255.255.255.0"
pollType="aview" readInfo="espublic" targetHost="129.158.168.0"
targetIp="129.158.168.0"
targetUrl="snmp://129.158.168.63:164/mod/topology+view-104"
type="" writeInfo="" xCoord="" yCoord="">
<ENTITY arch="SunOS 5.8" config="" desc="wizard" entityId="e-1"
family="sun4u-Sun-Ultra-2"
fulldesc="SUNW,Ultra-2" hostname="wizard" ipAddr="129.158.168.63"
isPoll="false" isSoftGroupLink="false" netMask="255.255.255.0"
pollType="ahost" readInfo="public" targetHost="" targetIp=""
targetUrl="snmp://129.158.168.63:1100/sym//base/mibman/modules"
type="" writeInfo=""
xCoord="" yCoord=""
/>
</ENTITY>
</ENTITY>
<ENTITY arch="" config="" desc="myworkstation" entityId="e-5"
family="nonagent-sun4u-Sun-Ultra30" fulldesc="" hostname="wizard"
ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false"
netMask="" pollType="snmp" readInfo="public" targetHost=""
targetIp="" targetUrl="snmp://wizard:1100/oid//1.3.6.1.2.1.1.7.0"
type="" writeInfo="private" xCoord="52" yCoord="253"
/>
<ENTITY arch="SunOS 5.8" config="" desc="System Group" entityId="e-6"
family="base-agent" fulldesc="MIB tree branch" hostname="wizard"
ipAddr="129.158.168.63" isPoll="false" isSoftGroupLink="false"
netMask="255.255.255.255" pollType="amod" readInfo=""
targetHost="wizard" targetIp="129.158.168.63"
targetUrl="snmp://129.158.168.63:1100/mod/mib2-simple/system"
type="" writeInfo="" xCoord="52" yCoord="329"
/>
<ADORNMENT Config="bus" Id="adorn-7" Type="layout" XCoord="0" YCoord="0" />
</DOMAIN>
</DOCUMENT>