wgknowles wrote:
LastBootUpTime is the Date and time the operating system was last restarted.
I've yet to find an elegant way to accurately report historical uptime values.
Accurate information exists in the event logs, but parsing it out proves difficult.
The uptime.exe utility does a pretty good job of extracting this information, but it would be nice to create a report that could be presented in the LanSweeper web GUI for this.
Well I can do that with my tool, but it is too much customized to post it here, since I interact with several information such as costcenters of allocated users. I can also easily insert the uptime value on a Custom field and use it in a report for the web GUI. I do all this with AutoIt, I can post some examples of the functions I use, I'm building an Excel file with the following information:
Hostname|CostCenter|Allocated user|Uptime|Last user logged in.
I've basically created a console application that gets all hostnames from LS database, then pings it, if success then check uptime reading LastBootUpTime value using WMI. If uptime>7 days then it will scan the last user logged in, and resolve the username to DisplayName also from LS database, and get the Costcenter also from LS database. This utility runs once a day and the report is available for the responsibles of the department for that cost center.