<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Windows Uptime Reporting in Server Management - Systems Insight Manager</title>
    <link>https://community.hpe.com/t5/server-management-systems/windows-uptime-reporting/m-p/3995320#M27283</link>
    <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;This is getting outside of HP SIM, but I would guess a simple VB script would yield uptime results for you.  An example is here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.naterice.com/blog/template_permalink.asp?id=32" target="_blank"&gt;http://www.naterice.com/blog/template_permalink.asp?id=32&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You could combine this with scripting that pulls a lists of servers from an AD OU into a dictionary object and then interate through each server using portions of the script from above.  Here is an example (you fill in the AD stuff):&lt;BR /&gt;&lt;BR /&gt;Set objDictionary = CreateObject("Scripting.Dictionary")&lt;BR /&gt;i = 0&lt;BR /&gt;Set objOU = GetObject("LDAP://OU=ServersOU, DC=YourADDomin, DC=COM")&lt;BR /&gt;objOU.Filter = Array("Computer")&lt;BR /&gt;For Each objDC in objOU&lt;BR /&gt;    objDictionary.Add i, objDC.CN&lt;BR /&gt;    i = i + 1&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In fact, you can probably get all of this done without using SIM at all.&lt;BR /&gt;&lt;BR /&gt;Nelson</description>
    <pubDate>Tue, 08 May 2007 08:33:09 GMT</pubDate>
    <dc:creator>NJK-Work</dc:creator>
    <dc:date>2007-05-08T08:33:09Z</dc:date>
    <item>
      <title>Windows Uptime Reporting</title>
      <link>https://community.hpe.com/t5/server-management-systems/windows-uptime-reporting/m-p/3995319#M27282</link>
      <description>I am aware that the System Uptime report in SIM does not work with Windows servers.  I am also aware of the uptime.exe that Microsoft provides to retrieve uptime information from Windows servers.  Does anyone currently utilize this utility to, or know of a way to, create reports that do not need to be manually massaged so that they can be emailed to upper management like the System Uptime report?  Or does anyone know of a way to somehow have this data injected into the SQL database to be extracted by a custom report?  We have this functionality with NNM and OpenView, but it is somewhat cumbersome and still needs to be manipulated after it has been extracted.  I think it would be nice if the HP agents could provide this information to SIM or SIM could pull this information into the database by utilizing the uptime.exe application</description>
      <pubDate>Mon, 07 May 2007 14:29:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/windows-uptime-reporting/m-p/3995319#M27282</guid>
      <dc:creator>Mike EvansCengageLearni</dc:creator>
      <dc:date>2007-05-07T14:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Uptime Reporting</title>
      <link>https://community.hpe.com/t5/server-management-systems/windows-uptime-reporting/m-p/3995320#M27283</link>
      <description>Hi Mike,&lt;BR /&gt;&lt;BR /&gt;This is getting outside of HP SIM, but I would guess a simple VB script would yield uptime results for you.  An example is here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.naterice.com/blog/template_permalink.asp?id=32" target="_blank"&gt;http://www.naterice.com/blog/template_permalink.asp?id=32&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You could combine this with scripting that pulls a lists of servers from an AD OU into a dictionary object and then interate through each server using portions of the script from above.  Here is an example (you fill in the AD stuff):&lt;BR /&gt;&lt;BR /&gt;Set objDictionary = CreateObject("Scripting.Dictionary")&lt;BR /&gt;i = 0&lt;BR /&gt;Set objOU = GetObject("LDAP://OU=ServersOU, DC=YourADDomin, DC=COM")&lt;BR /&gt;objOU.Filter = Array("Computer")&lt;BR /&gt;For Each objDC in objOU&lt;BR /&gt;    objDictionary.Add i, objDC.CN&lt;BR /&gt;    i = i + 1&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In fact, you can probably get all of this done without using SIM at all.&lt;BR /&gt;&lt;BR /&gt;Nelson</description>
      <pubDate>Tue, 08 May 2007 08:33:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/windows-uptime-reporting/m-p/3995320#M27283</guid>
      <dc:creator>NJK-Work</dc:creator>
      <dc:date>2007-05-08T08:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Uptime Reporting</title>
      <link>https://community.hpe.com/t5/server-management-systems/windows-uptime-reporting/m-p/3995321#M27284</link>
      <description>Thanks for the reply!  Unfortunately, that just looks like a more complex way of doing what I have already done, adding uptime.exe as a custom tool.</description>
      <pubDate>Tue, 08 May 2007 08:37:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/windows-uptime-reporting/m-p/3995321#M27284</guid>
      <dc:creator>Mike EvansCengageLearni</dc:creator>
      <dc:date>2007-05-08T08:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Uptime Reporting</title>
      <link>https://community.hpe.com/t5/server-management-systems/windows-uptime-reporting/m-p/3995322#M27285</link>
      <description>The uptime.exe command is easier for a small number of computer servers. I have not yet created any scripts (VBS) or spreadsheets to calculate uptime.  This is straight forward to do, as the date/time notice is # of seconds from 1970. Simple subtraction can calculate this.   &lt;BR /&gt;&lt;BR /&gt;On a computer running HP SIM, with Microsoft SQL 2000 server for the HP SIM database configure HP SIM, enable SQL views and query template to determine computer server system availability. &lt;BR /&gt;This query produces this report &lt;BR /&gt;Computer Event description # of milliseconds &lt;BR /&gt;computer-name  hp.nodestatus.unreachable 1177915832104 &lt;BR /&gt;The events hp.nodestatus.unreachable and reachable are saved. &lt;BR /&gt;&lt;BR /&gt;The number of milliseconds since 1970 UTC is the date/time notice. It makes calculations of uptime easy (simply subtraction to determine the time. &lt;BR /&gt;References: HP Systems Insight Manager Technical Reference Guide, HP part # 356920-007, November 2005, Edition 4.0 (for HP SIM 5.0), Reference Information, Database Tables, starting at page 645 &lt;BR /&gt;&lt;BR /&gt;1. Created B_Uptime SQL views - SQL Enterprise Manager &lt;BR /&gt;Copied HP supplied R_Inventory view to newly created B_Uptime view. &lt;BR /&gt;Added these tables to this B_Uptime view, notices and noticeType; &lt;BR /&gt;Added rows from the notice table &lt;BR /&gt;notice.noticeid, notice.NoticeServerity, notice.DeviceKey, notice.Generated &lt;BR /&gt;Added these rows from the noticeType table &lt;BR /&gt;notice.noticeType, notice.typeIdStr &lt;BR /&gt;&lt;BR /&gt;2. Query template to generate data for computer system uptime &lt;BR /&gt;&lt;BR /&gt;Notes: &lt;BR /&gt;* consolidatedNodeAuths.userID = aaaaaaaaaaa is a particular useid. this field may change for different people and their different accounts; &lt;BR /&gt;* ( IPAddress.IPAddressNumber &amp;gt;= xxxxxx AND IPAddress.IPAddressNumber &amp;lt;= yyyyyy ) ) &lt;BR /&gt;this is for site 150 10.150.x.x; it is the "long form" of the TCP/IP address; it will need to change for different sites or TCP/IP address ranges &lt;BR /&gt;* This devices.productType = 28 and other type = specifies computer servers, not desktop or notebook computers, nor printers nor routers. &lt;BR /&gt;&lt;BR /&gt;select B_Uptime.DeviceName, B_Uptime.typeIdStr, B_Uptime.Generated from B_Uptime &lt;BR /&gt;WHERE ((B_Uptime.SnapShotID=-1) OR (B_Uptime.SnapShotID is NULL)) &lt;BR /&gt;AND ((B_Uptime.typeIdStr='Trap.coldstart') OR (B_Uptime.typeIdStr='Trap.linkup') OR &lt;BR /&gt;(B_Uptime.typeIdStr='Insight.DiscoveredDevice') OR (B_Uptime.typeIdStr='hp.nodestatus.unreachable') &lt;BR /&gt;OR (B_Uptime.typeIdStr='Trap.reachable')) &lt;BR /&gt;AND DeviceKey in (select devices.deviceKey from devices &lt;BR /&gt;JOIN notices ON devices.deviceKey = notices.deviceKey and notices.NoticeType = 1 &lt;BR /&gt;LEFT OUTER JOIN DB_deviceInfoEx ON devices.deviceKey = DB_deviceInfoEx.deviceKey &lt;BR /&gt;LEFT OUTER JOIN IPXAddress ON devices.deviceKey = IPXAddress.deviceKey and IPXAddress.ipxIndex = 0 &lt;BR /&gt;LEFT OUTER JOIN associated_device_data ON devices.deviceKey = associated_device_data.deviceKey &lt;BR /&gt;LEFT OUTER JOIN deviceProtocolInfo ON devices.deviceKey = deviceProtocolInfo.deviceKey &lt;BR /&gt;LEFT OUTER JOIN LockdownStatus ON devices.deviceKey = LockdownStatus.deviceKey &lt;BR /&gt;LEFT OUTER JOIN DeviceStatusValue ON devices.deviceKey = DeviceStatusValue.deviceKey &lt;BR /&gt;and DeviceStatusValue.StatusSourceId= 6 LEFT OUTER JOIN IPAddress ON devices.deviceKey = IPAddress.deviceKey &lt;BR /&gt;JOIN consolidatedNodeAuths ON devices.mxGuid = consolidatedNodeAuths.NodeId &lt;BR /&gt;and consolidatedNodeAuths.userID = aaaaaaaaaaa&lt;BR /&gt;WHERE ( ( IPAddress.IPAddressNumber &amp;gt;= xxxxxx AND IPAddress.IPAddressNumber &amp;lt;= yyyyy  ) ) &lt;BR /&gt;AND ( ( devices.productType = 28 OR devices.productType = 6 OR devices.productType = 1 &lt;BR /&gt;OR devices.productType = 24 OR devices.productType = 26) ) ) order by B_Uptime.DeviceName ASC &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SQL to create B_Uptime view (it shows which tables and rows are used) &lt;BR /&gt;&lt;BR /&gt;SELECT dbo.devices.DeviceKey, dbo.devices.Name AS DeviceName, dbo.devices.ProductName, dbo.DB_DeviceInfoEx.ProductId, &lt;BR /&gt;dbo.DB_DeviceInfoEx.TotalMemory AS MemorySize, dbo.DB_DeviceInfoEx.ROMVersion, dbo.DB_DeviceInfoEx.SerialNumber, &lt;BR /&gt;dbo.DB_DeviceInfoEx.AssetTag, dbo.DB_DeviceInfoEx.OSName, dbo.IPAddress.IPAddress, dbo.IPAddress.IPAddressNumber AS IPLongValue, &lt;BR /&gt;dbo.DB_DeviceInfoEx.OSVendor, computerSystem.SnapshotID, computerSystem.PrimaryOwnerContact AS DeviceOwner, &lt;BR /&gt;computerSystem.dc_SystemLocation AS Location, dbo.devices.ProductType, dbo.devices.OverallStatus AS DeviceStatus, &lt;BR /&gt;dbo.CIM_OperatingSystem.LastBootUpTime AS DeviceBootTime, dbo.devices.ProductSubType, dbo.devices.ProductTypeStr, &lt;BR /&gt;dbo.DC_ProliantHost.ServerRole, dbo.IPXAddress.IPXAddress, dbo.DC_ProliantHost.SystemUptime, dbo.notices.NoticeId, &lt;BR /&gt;dbo.notices.DeviceKey AS Expr1, dbo.IPAddress.DeviceKey AS Expr2, dbo.DB_DeviceInfoEx.DeviceKey AS Expr3, dbo.noticeType.noticeType, &lt;BR /&gt;dbo.notices.NoticeSeverity, dbo.notices.Generated, dbo.noticeType.typeIdStr &lt;BR /&gt;FROM dbo.devices INNER JOIN &lt;BR /&gt;dbo.notices ON dbo.devices.DeviceKey = dbo.notices.DeviceKey INNER JOIN &lt;BR /&gt;dbo.noticeType ON dbo.notices.NoticeType = dbo.noticeType.noticeType LEFT OUTER JOIN &lt;BR /&gt;dbo.IPXAddress ON dbo.devices.DeviceKey = dbo.IPXAddress.DeviceKey AND dbo.IPXAddress.ipxIndex = 0 LEFT OUTER JOIN &lt;BR /&gt;dbo.DB_DeviceInfoEx ON dbo.devices.DeviceKey = dbo.DB_DeviceInfoEx.DeviceKey LEFT OUTER JOIN &lt;BR /&gt;dbo.DC_ProliantHost RIGHT OUTER JOIN &lt;BR /&gt;dbo.CIM_OperatingSystem WITH (nolock) RIGHT OUTER JOIN &lt;BR /&gt;(SELECT CIM_ComputerSystem.SnapshotID, CIM_ComputerSystem.PrimaryOwnerContact, CIM_ComputerSystem.dc_SystemLocation, &lt;BR /&gt;CIM_ComputerSystem.NodeID &lt;BR /&gt;FROM CIM_ComputerSystem WITH (nolock) &lt;BR /&gt;WHERE ((CIM_ComputerSystem.R_PortCount IS NULL) AND CIM_ComputerSystem.ComputerSystem_LUID NOT IN &lt;BR /&gt;(SELECT partComponent &lt;BR /&gt;FROM CIM_ComponentCS WITH (nolock)))) computerSystem ON dbo.CIM_OperatingSystem.NodeID = computerSystem.NodeID AND &lt;BR /&gt;dbo.CIM_OperatingSystem.SnapshotID = computerSystem.SnapshotID ON dbo.DC_ProliantHost.SnapshotID = computerSystem.SnapshotID AND &lt;BR /&gt;dbo.DC_ProliantHost.NodeID = computerSystem.NodeID ON dbo.devices.DeviceKey = computerSystem.NodeID LEFT OUTER JOIN &lt;BR /&gt;dbo.IPAddress ON dbo.devices.DeviceKey = dbo.IPAddress.DeviceKey AND dbo.IPAddress.ipindex = 0 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;End</description>
      <pubDate>Thu, 10 May 2007 14:22:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/windows-uptime-reporting/m-p/3995322#M27285</guid>
      <dc:creator>SEBEMISMNUSA</dc:creator>
      <dc:date>2007-05-10T14:22:29Z</dc:date>
    </item>
  </channel>
</rss>

