Page 1 of 1 1
Topic Options
#147736 - 2005-09-14 04:58 AM Last Boot Time
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
Does anyone know why the last boot time would not be returned when selecting the LastBootUpTime from Win32_OperatingSystem ? It works fine on several thousand servers, but I've got about a hundred or so (WIN2K boxes) that won't return a time. The problem children return other values via WMI just fine. Is there another reliable way to determine the last time a box was rebooted?

Thanks

Top
#147737 - 2005-09-14 09:32 AM Re: Last Boot Time
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
You could use "uptime" - I think I got it in a resource kit.

AFAIK it just interrogate the system log for you.

Code:
C:\Temp>uptime sgb007968 /s
Uptime Report for: \\sgb007968

Current OS: Microsoft Windows XP, Service Pack 2, Uniprocessor Free.
Time Zone: GMT Daylight Time

System Events as of 14/09/2005 08:11:59:

Date: Time: Event: Comment:
---------- ----------- ------------------- -----------------------------------

16/06/2005 03:14:05 Shutdown
16/06/2005 03:15:07 Boot Prior downtime:0d 0h:1m:2s
22/06/2005 16:44:28 Shutdown Prior uptime:6d 13h:29m:21s
24/06/2005 07:57:17 Boot Prior downtime:1d 15h:12m:49s
27/06/2005 16:10:45 Shutdown Prior uptime:3d 8h:13m:28s
27/06/2005 16:11:45 Boot Prior downtime:0d 0h:1m:0s
28/06/2005 08:01:20 Shutdown Prior uptime:0d 15h:49m:35s
28/06/2005 08:02:17 Boot Prior downtime:0d 0h:0m:57s
01/07/2005 12:04:47 Shutdown Prior uptime:3d 4h:2m:30s
01/07/2005 12:05:42 Boot Prior downtime:0d 0h:0m:55s
08/07/2005 13:33:02 Shutdown Prior uptime:7d 1h:27m:20s
08/07/2005 13:33:59 Boot Prior downtime:0d 0h:0m:57s
08/07/2005 13:37:36 Shutdown Prior uptime:0d 0h:3m:37s
08/07/2005 13:38:35 Boot Prior downtime:0d 0h:0m:59s
11/07/2005 08:02:32 Shutdown Prior uptime:2d 18h:23m:57s
11/07/2005 08:03:30 Boot Prior downtime:0d 0h:0m:58s
13/07/2005 17:36:33 Shutdown Prior uptime:2d 9h:33m:3s
21/07/2005 08:54:35 Boot Prior downtime:7d 15h:18m:2s
25/07/2005 16:21:57 Shutdown Prior uptime:4d 7h:27m:22s
25/07/2005 16:22:54 Boot Prior downtime:0d 0h:0m:57s
26/07/2005 07:48:26 Shutdown Prior uptime:0d 15h:25m:32s
26/07/2005 07:50:16 Boot Prior downtime:0d 0h:1m:50s
02/08/2005 09:06:08 Shutdown Prior uptime:7d 1h:15m:52s
02/08/2005 09:07:02 Boot Prior downtime:0d 0h:0m:54s
12/08/2005 13:59:52 Shutdown Prior uptime:10d 4h:52m:50s
12/08/2005 14:00:47 Boot Prior downtime:0d 0h:0m:55s
12/08/2005 16:34:43 Shutdown Prior uptime:0d 2h:33m:56s
12/08/2005 16:35:53 Boot Prior downtime:0d 0h:1m:10s
13/08/2005 10:27:04 Shutdown Prior uptime:0d 17h:51m:11s
13/08/2005 10:28:03 Boot Prior downtime:0d 0h:0m:59s
19/08/2005 09:54:17 Shutdown Prior uptime:5d 23h:26m:14s
19/08/2005 09:54:44 Boot Prior downtime:0d 0h:0m:27s

Current System Uptime: 25 day(s), 22 hour(s), 17 minute(s), 40 second(s)


--------------------------------------------------------------------------------


Since 16/06/2005:

System Availability: 89.7113%
Total Uptime: 80d 22h:13m:3s
Total Downtime: 9d 6h:44m:51s
Total Reboots: 16
Mean Time Between Reboots: 5.64 days
Total Bluescreens: 0


Top
#147738 - 2005-09-15 03:24 AM Re: Last Boot Time
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
Thanks Richard. I was hoping for another method. In this case, the logs are archived and cleared each evening so the uptime utility wouldn't work.
Top
#147739 - 2005-09-15 03:48 AM Re: Last Boot Time
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, @ticks works for 25 days. then it's resetted.
_________________________
!

download KiXnet

Top
#147740 - 2005-09-17 03:57 PM Re: Last Boot Time
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Have you used a WMI browser to confirm that WMI itself actually contains a value in that attribute?

Otherwise, use e.g. ReadEventlog() to retrieve the last start-up time.
_________________________
There are two types of vessels, submarines and targets.

Top
#147741 - 2005-09-17 10:55 PM Re: Last Boot Time
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
If UPTIME doesn't return the information as Richard has shown above then ReadEventlog() isn't going to return the information either.
Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.065 seconds in which 0.03 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org