ns6 cms l1
Hey guys i'm looking for a way to report on the uptime of servers.
I have already setup a custom inventory to reboot on the last reboot of a server, so i understand how to use wmi to get the info i need.
i found and article that gives you the custom inventory to extract the info you need out of wmi (HOWTO4935)
it's basically extracting
c0 ="<%writexml "wmi:o.InstallDate"%>"
c1 ="<%writexml "wmi:o.LastBootUpTime"%>"
c2 ="<%writexml "wmi:o.LocalDateTime"%>"
and you will aend up with info like..
c0 ="2006-08-07T14:19:49"
c1 ="2009-04-15T08:09:16"
c2 ="2009-04-15T09:45:05
which is great... but i'm not good with creating a query to... i assume take the "current time" run it against the "last reboot time" to end up with a report giving you the uptime in days; hours.
Wondering if anyone could help out with this one