Skip to main content
ONTAP Automation
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

效能計數器

貢獻者

《The》介紹各個系統效能的豐富資訊ONTAP ONTAP 。它會將此資料匯出為一組_效能計數器_、您可以用來評估ONTAP 您的整套系統效能、並協助達成您的效能目標。

存取ONTAP 效能計數器

您可以ONTAP 使用兩個不同的API、以及ONTAP 透過VMware命令列介面來存取VMware效能計數器。

註 在自動化管理您的VMware部署時、支援使用支援功能的API是首選且具策略性的選項ONTAP ONTAP 。

ONTAPI API

NetApp Network Manageability SDK提供ONTAPI API。使用ONTAPI時、效能計數器會在物件集合內定義。每個物件對應於系統的實體或虛擬元件。根據系統組態、每個物件可以有一個或多個執行個體。

例如ONTAP 、如果您的支援系統有四個實體磁碟、則會有四個執行個體 disk 物件、每個物件都有自己的一組效能計數器。您可以使用ONTAPI來存取每個磁碟執行個體的個別計數器。

靜態API ONTAP

從VMware版本9.11.1開始ONTAP 、您也可以透過REST API存取效能資料。在這種情況下、效能計數器會組織成相當於ONTAPI物件的表格。每個表格列都相當於ONTAPI物件的執行個體。

例如ONTAP 、如果您的支援系統有四個實體磁碟 disk 表格將包含四列。每一列都可以個別存取、並包含一組效能計數器、可在該列中作為欄位或欄位使用。

準備使用REST API

您應該先準備好、再使用ONTAP REST API存取效能計數器。

效能計數器會組織在表格中

ONTAPI物件的子集可透過ONTAP REST API取得、並顯示為表格。例如、ONTAPI *主機介面卡*物件透過REST API呈現為*主機_adpater*表格。系統中的每個主機介面卡都是一列、有自己的一組效能計數器。

執行個體名稱 效能計數器

主機介面卡_1

總計_read_ops_1

總計寫入作業1

位元組_read_1

位元組寫入的1

MAX_LINK_DATA速率1

RSCN_count_1

主機介面卡_2

總計_read_ops_2.

總計寫入作業次數

位元組_read_2

位元組寫入資料2

MAX_LINK_DATA速率2

RSCN_count_2

主機介面卡_3

總計_read_ops_3.

總計寫入作業3

位元組_read_3

位元組寫入資料3.

MAX_LINK_DATA速率3

RSCN_count_3

其餘端點的摘要

共有四個主要端點可供存取ONTAP 不景效能計數器和相關表格。

註 每個REST端點都提供唯讀存取、而且僅支援* Get* HTTP方法。請參閱 "API 參考" 以取得更多資訊。
  • /叢集/計數器/表格

    傳回計數器表格及其架構定義的集合。

  • /叢集/計數器/表格/{name}

    傳回單一命名計數器表格的相關資訊。

  • /叢集/計數器/表格/{counter_name}/資料列

    傳回命名計數器表格中的列集合。

  • /叢集/計數器/表格/{counter_name}/列/{id}

    從命名的計數器表格傳回特定列。

從ONTAPI移轉至REST API

NetApp提供廣泛的支援、可將自動化程式碼從ONTAPI移轉至ONTAP REST API。這包括對應文件、以識別特定ONTAPI物件REST API中可用的等效效能計數器表。

請參閱您ONTAP 所使用之版本資訊的適當對應文件:

開始使用ONTAP 靜態API

以下範例說明如何使用REST API來存取ONTAP VMware效能計數器。這包括擷取可用表格的清單、以及探索表格結構。

開始之前

請先檢閱下列資訊、再使用範例。

身分證明ONTAP

您需要ONTAP 一個包含密碼在內的管理員帳戶。

叢集管理IP

您將需要為ONTAP 您的支援系統設定叢集管理IP位址。

所有API呼叫都使用Get方法

下列所有範例僅可用於擷取HTTP Get方法的資訊。

變動替代

每個Curl範例都包含一個或多個以大寫和方括弧括住文字表示的變數。請務必將這些變數替換成適合您環境的實際值。

範例符合端點

下列範例順序說明如何使用可用於擷取效能計數器的REST端點。請參閱 其餘端點的摘要 以取得更多資訊。

範例1:所有效能計數器表

您可以使用此REST API呼叫來探索所有可用的計數器管理器表格。

Curl範例
curl --request GET --user admin:<PASSWORD> 'https://<ONTAP_IP_ADDRESS>/api/cluster/counter/tables'
Json輸出範例
{
  "records": [
    {
      "name": "copy_manager",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/copy_manager"
        }
      }
    },
    {
      "name": "copy_manager:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/copy_manager%3Aconstituent"
        }
      }
    },
    {
      "name": "disk",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/disk"
        }
      }
    },
    {
      "name": "disk:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/disk%3Aconstituent"
        }
      }
    },
    {
      "name": "disk:raid_group",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/disk%3Araid_group"
        }
      }
    },
    {
      "name": "external_cache",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/external_cache"
        }
      }
    },
    {
      "name": "fcp",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/fcp"
        }
      }
    },
    {
      "name": "fcp:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/fcp%3Anode"
        }
      }
    },
    {
      "name": "fcp_lif",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/fcp_lif"
        }
      }
    },
    {
      "name": "fcp_lif:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/fcp_lif%3Anode"
        }
      }
    },
    {
      "name": "fcp_lif:port",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/fcp_lif%3Aport"
        }
      }
    },
    {
      "name": "fcp_lif:svm",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/fcp_lif%3Asvm"
        }
      }
    },
    {
      "name": "fcvi",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/fcvi"
        }
      }
    },
    {
      "name": "headroom_aggregate",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/headroom_aggregate"
        }
      }
    },
    {
      "name": "headroom_cpu",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/headroom_cpu"
        }
      }
    },
    {
      "name": "host_adapter",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/host_adapter"
        }
      }
    },
    {
      "name": "iscsi_lif",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/iscsi_lif"
        }
      }
    },
    {
      "name": "iscsi_lif:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/iscsi_lif%3Anode"
        }
      }
    },
    {
      "name": "iscsi_lif:svm",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/iscsi_lif%3Asvm"
        }
      }
    },
    {
      "name": "lif",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/lif"
        }
      }
    },
    {
      "name": "lif:svm",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/lif%3Asvm"
        }
      }
    },
    {
      "name": "lun",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/lun"
        }
      }
    },
    {
      "name": "lun:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/lun%3Aconstituent"
        }
      }
    },
    {
      "name": "lun:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/lun%3Anode"
        }
      }
    },
    {
      "name": "namespace",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/namespace"
        }
      }
    },
    {
      "name": "namespace:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/namespace%3Aconstituent"
        }
      }
    },
    {
      "name": "nfs_v4_diag",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/nfs_v4_diag"
        }
      }
    },
    {
      "name": "nic_common",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/nic_common"
        }
      }
    },
    {
      "name": "nvmf_lif",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/nvmf_lif"
        }
      }
    },
    {
      "name": "nvmf_lif:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/nvmf_lif%3Aconstituent"
        }
      }
    },
    {
      "name": "nvmf_lif:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/nvmf_lif%3Anode"
        }
      }
    },
    {
      "name": "nvmf_lif:port",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/nvmf_lif%3Aport"
        }
      }
    },
    {
      "name": "object_store_client_op",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/object_store_client_op"
        }
      }
    },
    {
      "name": "path",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/path"
        }
      }
    },
    {
      "name": "processor",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/processor"
        }
      }
    },
    {
      "name": "processor:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/processor%3Anode"
        }
      }
    },
    {
      "name": "qos",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/qos"
        }
      }
    },
    {
      "name": "qos:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/qos%3Aconstituent"
        }
      }
    },
    {
      "name": "qos:policy_group",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/qos%3Apolicy_group"
        }
      }
    },
    {
      "name": "qos_detail",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/qos_detail"
        }
      }
    },
    {
      "name": "qos_detail_volume",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/qos_detail_volume"
        }
      }
    },
    {
      "name": "qos_volume",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/qos_volume"
        }
      }
    },
    {
      "name": "qos_volume:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/qos_volume%3Aconstituent"
        }
      }
    },
    {
      "name": "qtree",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/qtree"
        }
      }
    },
    {
      "name": "qtree:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/qtree%3Aconstituent"
        }
      }
    },
    {
      "name": "svm_cifs",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_cifs"
        }
      }
    },
    {
      "name": "svm_cifs:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_cifs%3Aconstituent"
        }
      }
    },
    {
      "name": "svm_cifs:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_cifs%3Anode"
        }
      }
    },
    {
      "name": "svm_nfs_v3",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v3"
        }
      }
    },
    {
      "name": "svm_nfs_v3:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v3%3Aconstituent"
        }
      }
    },
    {
      "name": "svm_nfs_v3:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v3%3Anode"
        }
      }
    },
    {
      "name": "svm_nfs_v4",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v4"
        }
      }
    },
    {
      "name": "svm_nfs_v41",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v41"
        }
      }
    },
    {
      "name": "svm_nfs_v41:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v41%3Aconstituent"
        }
      }
    },
    {
      "name": "svm_nfs_v41:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v41%3Anode"
        }
      }
    },
    {
      "name": "svm_nfs_v42",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v42"
        }
      }
    },
    {
      "name": "svm_nfs_v42:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v42%3Aconstituent"
        }
      }
    },
    {
      "name": "svm_nfs_v42:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v42%3Anode"
        }
      }
    },
    {
      "name": "svm_nfs_v4:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v4%3Aconstituent"
        }
      }
    },
    {
      "name": "svm_nfs_v4:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/svm_nfs_v4%3Anode"
        }
      }
    },
    {
      "name": "system",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/system"
        }
      }
    },
    {
      "name": "system:constituent",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/system%3Aconstituent"
        }
      }
    },
    {
      "name": "system:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/system%3Anode"
        }
      }
    },
    {
      "name": "token_manager",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/token_manager"
        }
      }
    },
    {
      "name": "volume",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/volume"
        }
      }
    },
    {
      "name": "volume:node",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/volume%3Anode"
        }
      }
    },
    {
      "name": "volume:svm",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/volume%3Asvm"
        }
      }
    },
    {
      "name": "wafl",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/wafl"
        }
      }
    },
    {
      "name": "wafl_comp_aggr_vol_bin",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/wafl_comp_aggr_vol_bin"
        }
      }
    },
    {
      "name": "wafl_hya_per_aggregate",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/wafl_hya_per_aggregate"
        }
      }
    },
    {
      "name": "wafl_hya_sizer",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/wafl_hya_sizer"
        }
      }
    }
  ],
  "num_records": 71,
  "_links": {
    "self": {
      "href": "/api/cluster/counter/tables"
    }
  }
}

範例2:特定表格的高層資訊

您可以使用此REST API呼叫來顯示特定表格的說明和中繼資料。輸出內容包括表格用途、以及每個效能計數器所包含的資料類型。本範例使用*主機介面卡*表格。

Curl範例
curl --request GET --user admin:<PASSWORD> 'https://<ONTAP_IP_ADDRESS>/api/cluster/counter/tables/host_adapter'
Json輸出範例
{
  "name": "host_adapter",
  "description": "The host_adapter table reports activity on the Fibre Channel, Serial Attached SCSI, and parallel SCSI host adapters the storage system uses to connect to disks and tape drives.",
  "counter_schemas": [
    {
      "name": "bytes_read",
      "description": "Bytes read through a host adapter",
      "type": "rate",
      "unit": "per_sec"
    },
    {
      "name": "bytes_written",
      "description": "Bytes written through a host adapter",
      "type": "rate",
      "unit": "per_sec"
    },
    {
      "name": "max_link_data_rate",
      "description": "Max link data rate in Kilobytes per second for a host adapter",
      "type": "raw",
      "unit": "kb_per_sec"
    },
    {
      "name": "node.name",
      "description": "System node name",
      "type": "string",
      "unit": "none"
    },
    {
      "name": "rscn_count",
      "description": "Number of RSCN(s) received by the FC HBA",
      "type": "raw",
      "unit": "none"
    },
    {
      "name": "total_read_ops",
      "description": "Total number of reads on a host adapter",
      "type": "rate",
      "unit": "per_sec"
    },
    {
      "name": "total_write_ops",
      "description": "Total number of writes on a host adapter",
      "type": "rate",
      "unit": "per_sec"
    }
  ],
  "_links": {
    "self": {
      "href": "/api/cluster/counter/tables/host_adapter"
    }
  }
}

範例3:特定表格中的所有列

您可以使用此REST API呼叫來檢視表格中的所有列。這表示Counter Manager物件存在哪些執行個體。

Curl範例
curl --request GET --user admin:<PASSWORD> 'https://<ONTAP_IP_ADDRESS>/api/cluster/counter/tables/host_adapter/rows'
Json輸出範例
{
  "records": [
    {
      "id": "dmp-adapter-01",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/host_adapter/rows/dmp-adapter-01"
        }
      }
    },
    {
      "id": "dmp-adapter-02",
      "_links": {
        "self": {
          "href": "/api/cluster/counter/tables/host_adapter/rows/dmp-adapter-02"
        }
      }
    }
  ],
  "num_records": 2,
  "_links": {
    "self": {
      "href": "/api/cluster/counter/tables/host_adapter/rows"
    }
  }
}

範例4:特定表格中的單一列

您可以使用此REST API呼叫來檢視表格中特定計數器管理程式執行個體的效能計數器值。在此範例中、會要求其中一個主機介面卡的效能資料。

Curl範例
curl --request GET --user admin:<PASSWORD> 'https://<ONTAP_IP_ADDRESS>/api/cluster/counter/tables/host_adapter/rows/dmp-adapter-01'
Json輸出範例
{
  "counter_table": {
    "name": "host_adapter"
  },
  "id": "dmp-adapter-01",
  "properties": [
    {
      "name": "node.name",
      "value": "dmp-node-01"
    }
  ],
  "counters": [
    {
      "name": "total_read_ops",
      "value": 25098
    },
    {
      "name": "total_write_ops",
      "value": 48925
    },
    {
      "name": "bytes_read",
      "value": 1003799680
    },
    {
      "name": "bytes_written",
      "value": 6900961600
    },
    {
      "name": "max_link_data_rate",
      "value": 0
    },
    {
      "name": "rscn_count",
      "value": 0
    }
  ],
  "_links": {
    "self": {
      "href": "/api/cluster/counter/tables/host_adapter/rows/dmp-adapter-01"
    }
  }
}