45 lines
1.0 KiB
Batchfile
45 lines
1.0 KiB
Batchfile
|
@echo off
|
|||
|
echo <20><>ʼ<EFBFBD><CABC>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD>......
|
|||
|
|
|||
|
rem <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>logs·<73><C2B7>
|
|||
|
set agentlog="D:\agent\ubackup\uagent\logs"
|
|||
|
|
|||
|
rem <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|||
|
for /f "tokens=*" %%i in ('powershell -c "Get-Date -UFormat %%V"') do (
|
|||
|
set vars=%%i
|
|||
|
)
|
|||
|
|
|||
|
set filename=C:\ComputerInfos_week_%vars%.txt
|
|||
|
|
|||
|
echo <20><><EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD>:%vars%<EFBFBD><EFBFBD> >>%filename%
|
|||
|
|
|||
|
|
|||
|
SET CurrentTime=%date:~0,10% %time:~0,5%
|
|||
|
echo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>䣺%CurrentTime% >>%filename%
|
|||
|
|
|||
|
|
|||
|
rem <20>鿴<EFBFBD>ڴ<EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
echo 1.<2E>ڴ<EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>>%filename%
|
|||
|
wmic OS get FreePhysicalMemory| findstr /r /v "^$" | more >>%filename%
|
|||
|
wmic ComputerSystem get TotalPhysicalMemory| findstr /r /v "^$" |more >>%filename%
|
|||
|
|
|||
|
rem <20>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
echo 2.<2E><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>>%filename%
|
|||
|
wmic logicaldisk get caption,freespace,size| findstr /r /v "^$"|more >>%filename%
|
|||
|
|
|||
|
rem <20>鿴CPUʹ<55><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
echo 3.CPUʹ<55><CAB9><EFBFBD>ʣ<EFBFBD>>>%filename%
|
|||
|
wmic cpu get loadpercentage| findstr /r /v "^$"|more >>%filename%
|
|||
|
|
|||
|
|
|||
|
rem <20>鿴<EFBFBD><E9BFB4>־<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>С<EFBFBD><D0A1>
|
|||
|
echo 4.<2E><>־<EFBFBD>ļ<EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>>>%filename%
|
|||
|
|
|||
|
dir %agentlog% >>%filename%
|
|||
|
|
|||
|
echo "===================%CurrentTime%<EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD>ȡϵͳ<EFBFBD><EFBFBD>Ϣ================ " >>%filename%
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|