相當於 Windows 上的 /proc/pid/status

相當於 Windows 上的 /proc/pid/status

我在 Linux 上使用 /proc/pid/status |grep VmRSS 來找出特定進程的記憶體使用情況。

是否可以在 Windows 上做同樣的事情?

答案1

tasklist /FI "PID eq ABCD" /FO csv- 顯示進程的非常基本的資訊;您可以透過管道findstr來取得記憶體的行/字串

答案2

我認為 Sysinternals 工具清單可能對你有幫助。

參考:清單

答案3

如果您想查看進程的記憶體使用情況,可以透過批次檔執行以下腳本;以 powershell.exe 為例:

@echo off
for /f "tokens=5 delims= " %%A in ('tasklist /NH /FI "ImageName Eq powershell.exe"') do (
    echo %%A K
)

相關內容