<?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: What is the best way to get the CPU utilization information with a webscript in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12996#M5735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you wouldn't need to. All the data is freely accessible from a Java context without using the Admin JavaScript object. That is the reason why it was so simple for us to re-create the Enterprise Edition-only Support Tools for Community Edition (via the OOTBee Support Tools project). The JavaScript object is only wrapping that access code and exposes it to JavaScript...&lt;/P&gt;&lt;P&gt;Though the OOTBee Support Tools also uses &lt;A href="https://github.com/OrderOfTheBee/ootbee-support-tools/blob/master/repository/src/main/amp/config/alfresco/templates/webscripts/org/orderofthebee/support-tools/admin/ootbee-support-tools/performance.lib.js#L35" rel="nofollow noopener noreferrer"&gt;JavaScript code, this&lt;/A&gt; basically just access the Java class&amp;nbsp;&lt;SPAN class=""&gt;java&lt;/SPAN&gt;.&lt;SPAN class=""&gt;lang&lt;/SPAN&gt;.&lt;SPAN class=""&gt;management&lt;/SPAN&gt;.&lt;SPAN class=""&gt;ManagementFactory to acecss the memory mbean to view memory metrics.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Aug 2017 20:37:50 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2017-08-17T20:37:50Z</dc:date>
    <item>
      <title>What is the best way to get the CPU utilization information with a webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12992#M5731</link>
      <description>On the Admin tools there is a system performance page that we use to check the CPU&amp;nbsp;utilization. I am trying to create&amp;nbsp;a monitor page and want to use that information to mark my server up or down from routing if the server's CPU&amp;nbsp;is pegged.Can I access that same info displayed on the admin tool with a</description>
      <pubDate>Wed, 16 Aug 2017 11:32:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12992#M5731</guid>
      <dc:creator>josh_barrett</dc:creator>
      <dc:date>2017-08-16T11:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to get the CPU utilization information with a webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12993#M5732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The admin tool&amp;nbsp;loads its data via a JSON-based web script that you can use for monitoring as well. See &lt;A href="http://www.zylk.net/es/web-2-0/blog/-/blogs/monitoring-alfresco-in-nagios-via-ootb-support-tools-addon" rel="nofollow noopener noreferrer"&gt;this blog post&lt;/A&gt; by &lt;B&gt;Cesar Capillas&lt;/B&gt;‌ for examples...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 13:36:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12993#M5732</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-08-16T13:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to get the CPU utilization information with a webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12994#M5733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Axel! &amp;nbsp; I am using the following to get the info I need. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.alfresco.com/message/ff" rel="nofollow noopener noreferrer"&gt;http://server:8080/alfresco/s/enterprise/admin/admin-performance?format=json&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which returns JSON that I can use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: medium;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;FreeMemory&lt;/SPAN&gt;: &lt;SPAN class="" style="color: blue;"&gt;8478&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MaxMemory&lt;/SPAN&gt;: &lt;SPAN class="" style="color: blue;"&gt;18432&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;TotalMemory&lt;/SPAN&gt;: &lt;SPAN class="" style="color: blue;"&gt;12288&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;CPULoad&lt;/SPAN&gt;: &lt;SPAN class="" style="color: blue;"&gt;25&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ThreadCount&lt;/SPAN&gt;: &lt;SPAN class="" style="color: blue;"&gt;218&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;PeakThreadCount&lt;/SPAN&gt;: &lt;SPAN class="" style="color: blue;"&gt;225&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: medium;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 15:59:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12994#M5733</guid>
      <dc:creator>josh_barrett</dc:creator>
      <dc:date>2017-08-16T15:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to get the CPU utilization information with a webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12995#M5734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;B&gt;Axel Faust&lt;/B&gt;‌, &lt;B&gt;Cesar Capillas&lt;/B&gt;‌, &amp;nbsp;Follow up question... &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to wire the Admin javascript object into a java backed webscript? &amp;nbsp; I already have a java backed webscript I am using for my monitor. &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.0pt;"&gt;Admin.getMBeanAttributes(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #6a8759;"&gt;"java.lang:type=OperatingSystem"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[&lt;SPAN style="color: #6a8759;"&gt;"ProcessCpuLoad"&lt;/SPAN&gt;]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;SPAN style="color: #cc7832;"&gt;; &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 18:21:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12995#M5734</guid>
      <dc:creator>josh_barrett</dc:creator>
      <dc:date>2017-08-17T18:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to get the CPU utilization information with a webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12996#M5735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you wouldn't need to. All the data is freely accessible from a Java context without using the Admin JavaScript object. That is the reason why it was so simple for us to re-create the Enterprise Edition-only Support Tools for Community Edition (via the OOTBee Support Tools project). The JavaScript object is only wrapping that access code and exposes it to JavaScript...&lt;/P&gt;&lt;P&gt;Though the OOTBee Support Tools also uses &lt;A href="https://github.com/OrderOfTheBee/ootbee-support-tools/blob/master/repository/src/main/amp/config/alfresco/templates/webscripts/org/orderofthebee/support-tools/admin/ootbee-support-tools/performance.lib.js#L35" rel="nofollow noopener noreferrer"&gt;JavaScript code, this&lt;/A&gt; basically just access the Java class&amp;nbsp;&lt;SPAN class=""&gt;java&lt;/SPAN&gt;.&lt;SPAN class=""&gt;lang&lt;/SPAN&gt;.&lt;SPAN class=""&gt;management&lt;/SPAN&gt;.&lt;SPAN class=""&gt;ManagementFactory to acecss the memory mbean to view memory metrics.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 20:37:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12996#M5735</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-08-17T20:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to get the CPU utilization information with a webscript</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12997#M5736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked like a charm. &amp;nbsp;Thank you &lt;B&gt;Axel Faust&lt;/B&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.0pt;"&gt;OperatingSystemMXBean osBean = (com.sun.management.OperatingSystemMXBean)ManagementFactory.&lt;SPAN style="color: #9876aa;"&gt;getOperatingSystemMXBean&lt;/SPAN&gt;()&lt;BR /&gt;&lt;SPAN style="color: #9876aa;"&gt;monitorInfo&lt;/SPAN&gt;.&lt;SPAN style="color: #9876aa;"&gt;setCpuUtilization&lt;/SPAN&gt;(osBean.&lt;SPAN style="color: #9876aa;"&gt;processCpuLoad&lt;/SPAN&gt;*&lt;SPAN style="color: #6897bb;"&gt;100&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 16:58:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/what-is-the-best-way-to-get-the-cpu-utilization-information-with/m-p/12997#M5736</guid>
      <dc:creator>josh_barrett</dc:creator>
      <dc:date>2017-08-28T16:58:48Z</dc:date>
    </item>
  </channel>
</rss>

