
我需要從命令列了解記憶體/CPU 使用歷史記錄。我的伺服器是 Debian(僅限文字模式)。是否可以?
答案1
您可以使用 -b 選項以批次模式執行 top 命令,然後將其轉儲到檔案中。
伺服器啟動時,打開終端,執行以下命令。
top -b > ~/cpu.txt
sysstat 工具集合包含 sar,它能夠保存系統活動資訊:http://pagesperso-orange.fr/sebastien.godard/documentation.html
問候,帕雷什
我需要從命令列了解記憶體/CPU 使用歷史記錄。我的伺服器是 Debian(僅限文字模式)。是否可以?
您可以使用 -b 選項以批次模式執行 top 命令,然後將其轉儲到檔案中。
伺服器啟動時,打開終端,執行以下命令。
top -b > ~/cpu.txt
sysstat 工具集合包含 sar,它能夠保存系統活動資訊:http://pagesperso-orange.fr/sebastien.godard/documentation.html
問候,帕雷什