<?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: Hello, please help. What is the format of systemUpTime in an answer of API GET call of /xapi/v1/monitor/devices?ownerID=xxxxxx in Aerohive Migrated Content</title>
    <link>https://community.extremenetworks.com/t5/aerohive-migrated-content/hello-please-help-what-is-the-format-of-systemuptime-in-an/m-p/61084#M856</link>
    <description>&lt;P&gt;@Doug Kraemer​&amp;nbsp;Hello, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. You helped me a lot.  I decided to share solution to get human readable output. Here is the BASH script if it will somebody need it.  &lt;/P&gt;&lt;P&gt;I will publish a full Nagios script on GitHub later.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Example&amp;nbsp;value&amp;nbsp;from&amp;nbsp;the&amp;nbsp;output&amp;nbsp;of&amp;nbsp;API&amp;nbsp;CALL&lt;/P&gt;&lt;P&gt;AP_UPTIME=1568392266173&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Get&amp;nbsp;current&amp;nbsp;timestamp&amp;nbsp;in&amp;nbsp;milliseconds&lt;/P&gt;&lt;P&gt;CURRENT_TIME=`date&amp;nbsp;+%s%3N`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Difference&amp;nbsp;between&amp;nbsp;current&amp;nbsp;date&amp;nbsp;and&amp;nbsp;date&amp;nbsp;since&amp;nbsp;AP&amp;nbsp;was&amp;nbsp;active&lt;/P&gt;&lt;P&gt;UPTIME=$((&amp;nbsp;$CURRENT_TIME&amp;nbsp;-&amp;nbsp;$AP_UPTIME&amp;nbsp;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Converting&amp;nbsp;from&amp;nbsp;milliseconds&amp;nbsp;to&amp;nbsp;seconds&lt;/P&gt;&lt;P&gt;CONVERT=`echo&amp;nbsp;"scale=2;${UPTIME}/1000"&amp;nbsp;|&amp;nbsp;bc`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Rounding&amp;nbsp;seconds&lt;/P&gt;&lt;P&gt;seconds=`echo&amp;nbsp;$CONVERT&amp;nbsp;|&amp;nbsp;awk&amp;nbsp;'{printf("%d&lt;BR /&gt;
",$1&amp;nbsp;+&amp;nbsp;0.5)}'`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Converting&amp;nbsp;to&amp;nbsp;Days,&amp;nbsp;Hours,&amp;nbsp;Minutes,&amp;nbsp;Seconds&lt;/P&gt;&lt;P&gt;OUTPUT=`eval&amp;nbsp;"echo&amp;nbsp;$(date&amp;nbsp;-ud&amp;nbsp;"@$seconds"&amp;nbsp;+'$((%s/3600/24))&amp;nbsp;days&amp;nbsp;%H&amp;nbsp;hours&amp;nbsp;%M&amp;nbsp;minutes&amp;nbsp;%S&amp;nbsp;seconds')"`&lt;/P&gt;&lt;P&gt;echo&amp;nbsp;$OUTPUT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Example&amp;nbsp;Output:&amp;nbsp;38&amp;nbsp;days&amp;nbsp;17&amp;nbsp;hours&amp;nbsp;10&amp;nbsp;minutes&amp;nbsp;23&amp;nbsp;seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Oct 2019 16:46:32 GMT</pubDate>
    <dc:creator>jozef_rebjak</dc:creator>
    <dc:date>2019-10-22T16:46:32Z</dc:date>
    <item>
      <title>Hello, please help. What is the format of systemUpTime in an answer of API GET call of /xapi/v1/monitor/devices?ownerID=xxxxxx</title>
      <link>https://community.extremenetworks.com/t5/aerohive-migrated-content/hello-please-help-what-is-the-format-of-systemuptime-in-an/m-p/61082#M854</link>
      <description>&lt;P&gt;For me its showing&lt;B&gt; "systemUpTime"&lt;/B&gt;: 1568392255171,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in a HiveManager it's equal to the someting around 37d 15h 4m. I want to convert it to the human time. Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 14:36:32 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/aerohive-migrated-content/hello-please-help-what-is-the-format-of-systemuptime-in-an/m-p/61082#M854</guid>
      <dc:creator>jozef_rebjak</dc:creator>
      <dc:date>2019-10-21T14:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hello, please help. What is the format of systemUpTime in an answer of API GET call of /xapi/v1/monitor/devices?ownerID=xxxxxx</title>
      <link>https://community.extremenetworks.com/t5/aerohive-migrated-content/hello-please-help-what-is-the-format-of-systemuptime-in-an/m-p/61083#M855</link>
      <description>&lt;P&gt;Hello,,&lt;/P&gt;&lt;P&gt;That is the Unix Time stamp.  tells you the date it has been active since, you will need to subtract that from the current date to get the uptime.   You may use this page to do manual conversions, but it also has examples of how to convert it in almost all programming languages, and even some programs like Excel.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.epochconverter.com/" alt="https://www.epochconverter.com/" target="_blank"&gt;https://www.epochconverter.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Doug Kraemer&lt;/P&gt;&lt;P&gt;-ASC&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 00:05:25 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/aerohive-migrated-content/hello-please-help-what-is-the-format-of-systemuptime-in-an/m-p/61083#M855</guid>
      <dc:creator>dkraemer</dc:creator>
      <dc:date>2019-10-22T00:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Hello, please help. What is the format of systemUpTime in an answer of API GET call of /xapi/v1/monitor/devices?ownerID=xxxxxx</title>
      <link>https://community.extremenetworks.com/t5/aerohive-migrated-content/hello-please-help-what-is-the-format-of-systemuptime-in-an/m-p/61084#M856</link>
      <description>&lt;P&gt;@Doug Kraemer​&amp;nbsp;Hello, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. You helped me a lot.  I decided to share solution to get human readable output. Here is the BASH script if it will somebody need it.  &lt;/P&gt;&lt;P&gt;I will publish a full Nagios script on GitHub later.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#!/bin/bash&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Example&amp;nbsp;value&amp;nbsp;from&amp;nbsp;the&amp;nbsp;output&amp;nbsp;of&amp;nbsp;API&amp;nbsp;CALL&lt;/P&gt;&lt;P&gt;AP_UPTIME=1568392266173&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Get&amp;nbsp;current&amp;nbsp;timestamp&amp;nbsp;in&amp;nbsp;milliseconds&lt;/P&gt;&lt;P&gt;CURRENT_TIME=`date&amp;nbsp;+%s%3N`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Difference&amp;nbsp;between&amp;nbsp;current&amp;nbsp;date&amp;nbsp;and&amp;nbsp;date&amp;nbsp;since&amp;nbsp;AP&amp;nbsp;was&amp;nbsp;active&lt;/P&gt;&lt;P&gt;UPTIME=$((&amp;nbsp;$CURRENT_TIME&amp;nbsp;-&amp;nbsp;$AP_UPTIME&amp;nbsp;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Converting&amp;nbsp;from&amp;nbsp;milliseconds&amp;nbsp;to&amp;nbsp;seconds&lt;/P&gt;&lt;P&gt;CONVERT=`echo&amp;nbsp;"scale=2;${UPTIME}/1000"&amp;nbsp;|&amp;nbsp;bc`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Rounding&amp;nbsp;seconds&lt;/P&gt;&lt;P&gt;seconds=`echo&amp;nbsp;$CONVERT&amp;nbsp;|&amp;nbsp;awk&amp;nbsp;'{printf("%d&lt;BR /&gt;
",$1&amp;nbsp;+&amp;nbsp;0.5)}'`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Converting&amp;nbsp;to&amp;nbsp;Days,&amp;nbsp;Hours,&amp;nbsp;Minutes,&amp;nbsp;Seconds&lt;/P&gt;&lt;P&gt;OUTPUT=`eval&amp;nbsp;"echo&amp;nbsp;$(date&amp;nbsp;-ud&amp;nbsp;"@$seconds"&amp;nbsp;+'$((%s/3600/24))&amp;nbsp;days&amp;nbsp;%H&amp;nbsp;hours&amp;nbsp;%M&amp;nbsp;minutes&amp;nbsp;%S&amp;nbsp;seconds')"`&lt;/P&gt;&lt;P&gt;echo&amp;nbsp;$OUTPUT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;Example&amp;nbsp;Output:&amp;nbsp;38&amp;nbsp;days&amp;nbsp;17&amp;nbsp;hours&amp;nbsp;10&amp;nbsp;minutes&amp;nbsp;23&amp;nbsp;seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 16:46:32 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/aerohive-migrated-content/hello-please-help-what-is-the-format-of-systemuptime-in-an/m-p/61084#M856</guid>
      <dc:creator>jozef_rebjak</dc:creator>
      <dc:date>2019-10-22T16:46:32Z</dc:date>
    </item>
  </channel>
</rss>

