使用偵錯工具
本頁面說明可用來偵錯 Container-Optimized OS 的工具。
根據預設,perf
會安裝在 Container-Optimized OS 上。您可以透過殼層指令列,在 cos
執行個體上執行 perf
。
如果您擁有的權限有限,可能需要使用下列指令啟用效能事件系統:
echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
如要瞭解如何使用 perf,請參閱 perf
手冊和核心 sysctl 設定。
啟用核心當機傾印收集功能
在極少數發生核心錯誤的情況下,啟用核心當機傾印收集功能可協助您和 Cloud Customer Care 團隊找出根本原因。如要啟用當機傾印,請參閱開放原始碼說明文件中的「使用者指南:收集適用於 COS 的核心當機傾印資料」。本使用者指南說明如何在使用 Container-Optimized OS 的 GKE 節點或透過 Compute Engine 建立的 Container-Optimized OS 執行個體上,收集核心機發生當機時的傾印檔。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-19 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-19 (世界標準時間)。"],[[["The `perf` tool is pre-installed on Container-Optimized OS."],["You can directly execute `perf` commands on your `cos` instance via the command line."],["Elevated permissions might be required to enable performance events, which can be achieved by using the provided command."],["For guidance on utilizing `perf`, consult the `perf` manual and kernel sysctl settings."]]],[]]