Client Management Suite

 View Only
  • 1.  server uptime

    Posted May 06, 2011 08:44 AM

    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



  • 2.  RE: server uptime

    Posted May 06, 2011 03:58 PM

    What version of NS are you using?  whups, never mind, now I see it.  6.x, so that will be trickier.

    Depending on your version of SQL, you might be able to just capture the data into the database as is, then use SQL's CONVERT function to convert the date in your report to something friendlier.

    What SQL version is the database?

    If you try to run a test custom inventory capture, do the date/time strings actually make it to the database?  If I recall correctly, the only data type 6.x CI will accept is a string, so we'd have to do some additional SQL stuff on the back-end to make it usable.