"윈도우 uptime"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-<source +<syntaxhighlight , -</source> +</syntaxhighlight>))
 
(사용자 2명의 중간 판 26개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==방법1==
;윈도우 UPTIME 확인


==방법2==
==방법 1: powershell on cmd==
*Uptime.exe 다운로드
방법2의 powershell 명령어를 CMD로 포장한 것.
;명령어
<syntaxhighlight lang='bash'>
powershell "$u=Get-WmiObject -Class Win32_OperatingSystem; $u.ConvertToDateTime($u.LocalDateTime)-$u.ConvertToDateTime($u.LastBootUpTime)" | findstr TotalDays
</syntaxhighlight>
 
;실행예시
<syntaxhighlight lang='console'>
C:\Users\zetawiki>powershell "$u=Get-WmiObject -Class Win32_OperatingSystem; $u.ConvertToDateTime($u.LocalDateTime)-$u.ConvertToDateTime($u.LastBootUpTime)" | findstr TotalDays
TotalDays        : 23.934793401956
</syntaxhighlight>
:→ 부팅된지 약 23.9일 되었다.
 
==방법 2: powershell==
;명령어
<syntaxhighlight lang='powershell'>
$wmi = Get-WmiObject -Class Win32_OperatingSystem
$wmi.ConvertToDateTime($wmi.LocalDateTime) - $wmi.ConvertToDateTime($wmi.LastBootUpTime)
</syntaxhighlight>
 
;실행예시
<syntaxhighlight lang='console'>
PS C:\Users\zetawiki> $wmi = Get-WmiObject -Class Win32_OperatingSystem
PS C:\Users\zetawiki> $wmi.ConvertToDateTime($wmi.LocalDateTime) - $wmi.ConvertToDateTime($wmi.LastBootUpTime)
 
Days              : 23
Hours            : 22
Minutes          : 18
Seconds          : 24
Milliseconds      : 8
Ticks            : 20675040089290
TotalDays        : 23.9294445477894
TotalHours        : 574.306669146944
TotalMinutes      : 34458.4001488167
TotalSeconds      : 2067504.008929
TotalMilliseconds : 2067504008.929
</syntaxhighlight>
 
;명령어 변형예시
<syntaxhighlight lang='powershell'>
$wmi = Get-WmiObject -Class Win32_OperatingSystem
$uptime = $wmi.ConvertToDateTime($wmi.LocalDateTime) - $wmi.ConvertToDateTime($wmi.LastBootUpTime)
echo $uptime
</syntaxhighlight>
:→ 변수에 담아둘 수도 있다.
 
==방법 3: uptime.exe==
*uptime.exe 다운로드
:http://download.microsoft.com/download/winntsrv40/install/uptime_1.01/nt4/en-us/uptime.exe
:http://download.microsoft.com/download/winntsrv40/install/uptime_1.01/nt4/en-us/uptime.exe
:어디서든 실행할 수 있도록 C:\Windows\System32에 다운로드
:어디서든 실행할 수 있도록 C:\Windows\System32에 다운로드
<source lang='dos'>
<syntaxhighlight lang='console'>
C:\Users\Jmnote>uptime
C:\Users\zetawiki>uptime
\\JMNOTE-PC has been up for: 3 day(s), 7 hour(s), 10 minute(s), 52 second(s)
\\JMNOTE-PC has been up for: 3 day(s), 7 hour(s), 10 minute(s), 52 second(s)
</source>
</syntaxhighlight>
→ 3일 7시간 10분 52초
→ 3일 7시간 10분 52초
==방법 4: systeminfo==
*윈도우 2003, XP에서는 systeminfo에 Uptime이 나온다.<ref>반면 윈도우 2008, 7에서는 부팅시각이 나온다.</ref>
<syntaxhighlight lang='console'>
C:\Documents and Settings\jmnote>systeminfo | findstr Time
System Up Time:          42일, 0시간, 54분, 26초
</syntaxhighlight>
*윈도우 7에서는 Uptime이 나오지 않는다. 대신 부팅 시각은 알 수 있다.
<syntaxhighlight lang='console'>
C:\Users\zetawiki>systeminfo | findstr 부트
시스템 부트 시간:        2014-09-11, 오후 11:49:25
</syntaxhighlight>
==방법 5: wmic==
{{참고|윈도우 마지막 부팅시각 확인하기}}
wmic로 부팅시간을 보고 수작업으로 계산하자. (...)<ref>powershell이 없는 윈도우 2003, XP에서는 방법1, 방법2 사용불가</ref>
;명령어
<syntaxhighlight lang='bash'>
wmic os get lastbootuptime
</syntaxhighlight>
;실행예시
<syntaxhighlight lang='console'>
C:\Users\zetawiki>wmic os get lastbootuptime
LastBootUpTime
20120715071501.125019+540
</syntaxhighlight>
:→ 2012-07-15 07:15:01
==같이 보기==
*[[윈도우 마지막 부팅시각 확인하기]]
*[[윈도우 프로세스 시작시간 확인]]
*[[리눅스 uptime 확인하기]]
*[[uptime, downtime]]
==주석==
<references/>
==참고==
*http://technet.microsoft.com/ko-kr/magazine/2008.12.heyscriptingguy.aspx?pr=PuzzleAnswer


[[분류:윈도우]]
[[분류:윈도우]]

2021년 9월 24일 (금) 23:17 기준 최신판

윈도우 UPTIME 확인

1 방법 1: powershell on cmd[ | ]

방법2의 powershell 명령어를 CMD로 포장한 것.

명령어
powershell "$u=Get-WmiObject -Class Win32_OperatingSystem; $u.ConvertToDateTime($u.LocalDateTime)-$u.ConvertToDateTime($u.LastBootUpTime)" | findstr TotalDays
실행예시
C:\Users\zetawiki>powershell "$u=Get-WmiObject -Class Win32_OperatingSystem; $u.ConvertToDateTime($u.LocalDateTime)-$u.ConvertToDateTime($u.LastBootUpTime)" | findstr TotalDays
TotalDays         : 23.934793401956
→ 부팅된지 약 23.9일 되었다.

2 방법 2: powershell[ | ]

명령어
$wmi = Get-WmiObject -Class Win32_OperatingSystem
$wmi.ConvertToDateTime($wmi.LocalDateTime) - $wmi.ConvertToDateTime($wmi.LastBootUpTime)
실행예시
PS C:\Users\zetawiki> $wmi = Get-WmiObject -Class Win32_OperatingSystem
PS C:\Users\zetawiki> $wmi.ConvertToDateTime($wmi.LocalDateTime) - $wmi.ConvertToDateTime($wmi.LastBootUpTime)

Days              : 23
Hours             : 22
Minutes           : 18
Seconds           : 24
Milliseconds      : 8
Ticks             : 20675040089290
TotalDays         : 23.9294445477894
TotalHours        : 574.306669146944
TotalMinutes      : 34458.4001488167
TotalSeconds      : 2067504.008929
TotalMilliseconds : 2067504008.929
명령어 변형예시
$wmi = Get-WmiObject -Class Win32_OperatingSystem
$uptime = $wmi.ConvertToDateTime($wmi.LocalDateTime) - $wmi.ConvertToDateTime($wmi.LastBootUpTime)
echo $uptime
→ 변수에 담아둘 수도 있다.

3 방법 3: uptime.exe[ | ]

  • uptime.exe 다운로드
http://download.microsoft.com/download/winntsrv40/install/uptime_1.01/nt4/en-us/uptime.exe
어디서든 실행할 수 있도록 C:\Windows\System32에 다운로드
C:\Users\zetawiki>uptime
\\JMNOTE-PC has been up for: 3 day(s), 7 hour(s), 10 minute(s), 52 second(s)

→ 3일 7시간 10분 52초

4 방법 4: systeminfo[ | ]

  • 윈도우 2003, XP에서는 systeminfo에 Uptime이 나온다.[1]
C:\Documents and Settings\jmnote>systeminfo | findstr Time
System Up Time:          42일, 0시간, 54분, 26초
  • 윈도우 7에서는 Uptime이 나오지 않는다. 대신 부팅 시각은 알 수 있다.
C:\Users\zetawiki>systeminfo | findstr 부트
시스템 부트 시간:        2014-09-11, 오후 11:49:25

5 방법 5: wmic[ | ]

wmic로 부팅시간을 보고 수작업으로 계산하자. (...)[2]

명령어
wmic os get lastbootuptime
실행예시
C:\Users\zetawiki>wmic os get lastbootuptime
LastBootUpTime
20120715071501.125019+540
→ 2012-07-15 07:15:01

6 같이 보기[ | ]

7 주석[ | ]

  1. 반면 윈도우 2008, 7에서는 부팅시각이 나온다.
  2. powershell이 없는 윈도우 2003, XP에서는 방법1, 방법2 사용불가

8 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}