表示可能な CPU コアの数を表示する
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Linux
Windows
表示可能な CPU コアの数を表示するには、gcloud CLI または Compute Engine API を使用します。
gcloud
gcloud compute
instances describe
コマンドを使用して、VM に関する情報を取得します。
gcloud compute instances describe VM_NAME \
--zone=ZONE
次のように置き換えます。
VM_NAME
: VM の名前
ZONE
: VM が配置されているゾーン
出力では、visible-core-count
フィールドの値は可視 CPU コアの数です。出力に visible-core-count
フィールドが表示されない場合、VM にはデフォルトの可視 CPU コア数があります。
REST
VM に関する情報を取得するには、次の instances.get
メソッドを使用します。
GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/VM_NAME
次のように置き換えます。
PROJECT_ID
: プロジェクトの ID
ZONE
: VM が配置されているゾーン
VM_NAME
: VM の名前
出力では、visibleCoreCount
フィールドの値は可視 CPU コアの数です。
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-06-30 UTC。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻訳に関する問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"その他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"わかりやすい"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"問題の解決に役立った"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"その他"
}]