自己计算百分比吧
@echo off
:cpu
for /f "tokens=2 delims==" %%a in ('wmic path Win32_PerfFormattedData_PerfOS_Processor get PercentProcessorTime /value^|findstr "PercentProcessorTime"') do (
set UseCPU=%%a
goto :mem
)
:mem
for /f "tokens=2 delims==" %%a in ('wmic path Win32_PhysicalMemory get * /value^|findstr "Capacity"') do (
set TalMem=%%a
)
for /f "tokens=2 delims==" %%a in ('wmic path Win32_PerfFormattedData_PerfOS_Memory get * /value^|findstr "AvailableBytes"') do (
set UseMem=%%a
)
:show
echo CPU使用率:%UseCPU%%%
echo 物理内存总量:%TalMem%
echo 当前可用内存:%UseMem%