Sun Management Center 3.6 使用者指南

匯入和匯出檔案內容

以下清單可辨別匯入和匯出公用程式處理的拓樸資料。

實體資訊

有關各個網域、群組及主機的記錄資訊。

修飾資訊

有關網域與群組的修飾資訊。修飾資訊僅包含佈局和背景索引,而不包含背景內容。例如,有關背景的資訊僅包含 GIF 檔案名稱,而不包含 GIF 檔案。

關係資訊

關係資訊說明拓樸階層結構、實體背景和佈局。

檔案格式說明

匯入/匯出檔案說明匯入資料和匯出資料。您可以使用任何文字編輯器來編輯此檔案。此檔案包含拓樸階層結構中各個實體的相關資訊。因為附加匯出模式可將更多的物件資訊附加到檔案中,因此該格式易於延伸和分析。匯出的資料以 XML 格式儲存。

檔案格式設計

檔案分為四個部份:

Magic 資訊

Magic 資訊可識別此檔案為 XML 格式檔案。通常,此資訊顯示如下:


<? XML version = 1.0 ?>

DTD(文件類型聲明)

DTD 資訊定義文件的架構。匯出檔案的 DTD 類似以下範例。


範例 19–3 匯入和匯出檔案 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>
	]>

標頭資訊

標頭資訊用於記錄一般資訊,例如:

資料區塊

資料區塊包含拓樸階層結構架構和實體。

拓樸和匯出檔案範例

下圖為新的網域拓樸的圖解。

圖 19–2 新的拓樸範例

Sun Management Center 主控台視窗的一部份會顯示一個很小的網路,其中包括一個校園、三個主機物件、一個子網路及一個資料夾。


範例 19–4 新的網域的匯出檔案

此範例顯示新的網域的拓樸匯出檔案。

<?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>