![](/img/trans.png)
[英]Process memory, GPU shared memory and x86 process on x64 windows address space
[英]KIll a Process exceeding x GB Memory in Windows Server 2016 with bash (x > Int Range)
我正在嘗試通過 Windows Server 2016 中的批處理腳本自動終止進程。如果任何進程的 Memory 使用量超過 12GB,則應終止該進程。
已經有一個Version to kill processes below the maximum INT value: kill process if it exceeds 6GB
這不適用於大於 INT 可以處理的值。 您無法終止大於 2,147,483,647 x 2 的任務。
所以
taskkill /F /FI "MemUsage gt 12000000000"
結果是
ERROR: The search filter cannot be recognized.
知道如何繞過 Integer 范圍給出的 MemUsage 過濾器中的(32 位)限制嗎?
Taskkill 文檔: https://ss64.com/nt/taskkill.html
解決了。 請參閱 Daemon-5 的評論:
WMIC.EXE Process WHERE (WorkingSetSize ^> 12000000000) CALL Terminate
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.