<?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: OracleDB metric com.dynatrace.extension.sql-oracle.cpu.foregroundTotal in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/OracleDB-metric-com-dynatrace-extension-sql-oracle-cpu/m-p/291900#M6949</link>
    <description>&lt;P&gt;Hi Georgi,&lt;/P&gt;
&lt;P&gt;The foreground and background CPU usage metrics are coming from this query:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;          SELECT
                DECODE(metric_name, 'Background CPU Usage Per Sec', gv$metric.value) AS background_cpu_usage,
                DECODE(metric_name, 'CPU Usage Per Sec', gv$metric.value) AS foreground_cpu_usage,
                gv$instance.instance_name
          FROM
                gv$metric JOIN gv$metricgroup
                  ON gv$metric.group_id = gv$metricgroup.group_id AND gv$metric.inst_id = gv$metricgroup.inst_id
                  AND gv$metric.metric_name IN ('Background CPU Usage Per Sec', 'CPU Usage Per Sec')
          JOIN gv$instance
                ON gv$instance.inst_id = gv$metric.inst_id&lt;/LI-CODE&gt;
&lt;P&gt;This is essentially going on the V$METRIC view and pulling what Oracle reports as CPU usage per second.&lt;/P&gt;
&lt;P&gt;Centiseconds per second tells you how many hundredths of CPU seconds you are using each second. It does not directly correspond to a percentage, since with multiple cores, you could have more than 100 CPU centiseconds being used. For example, if you have 4 cores, you could have CPU time up to 400 centiseconds in a second. This is similar to what UNIX reports as CPU time, if you are familiar with that concept.&lt;/P&gt;
&lt;P&gt;To get a percentage value, I would recommend either dividing the CPU usage metrics by the&amp;nbsp;com.dynatrace.extension.sql-oracle.cpu.cores metric, which gives you the number of CPU cores, or use the process CPU percentage metric reported by the OneAgent.&lt;/P&gt;
&lt;P&gt;Let me know if that cleared it up!&lt;/P&gt;
&lt;P&gt;Sorry for the late reply, this only made it to my desk today. But better late than never &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Dec 2025 09:28:01 GMT</pubDate>
    <dc:creator>TomásSeroteRoos</dc:creator>
    <dc:date>2025-12-19T09:28:01Z</dc:date>
    <item>
      <title>OracleDB metric com.dynatrace.extension.sql-oracle.cpu.foregroundTotal</title>
      <link>https://community.dynatrace.com/t5/Extensions/OracleDB-metric-com-dynatrace-extension-sql-oracle-cpu/m-p/273087#M6061</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;I am struggling with two metrics in DT Managed. I looked around the threads but couldn't find something related to my issue.&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://community.dynatrace.com/html/@39026B374934B28F09FAB65F6B6DA87F/images/emoticons/face-with-monocle.png" alt=":face_with_monocle:" title=":face_with_monocle:" /&gt;&lt;/P&gt;&lt;P&gt;So, here's what I am trying to understand. We installed an &lt;A href="https://www.dynatrace.com/hub/detail/oracle-database/?query=oracle&amp;amp;filter=all&amp;amp;_gl=1*134slac*_ga*MTEyMTY5MTgzMS4xNjg2NjM3MDg5*_ga_1MEMV02JXV*MTc0MjQ4NzUzNi4xMy4xLjE3NDI0ODc2MzEuMC4wLjA." target="_self"&gt;OracleDB extension&lt;/A&gt; in DT to monitor the performance of our DBs. In the metrics that we get from the extension I see the following two:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;com.dynatrace.extension.sql-oracle.cpu.backgroundTotal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;com.dynatrace.extension.sql-oracle.cpu.foregroundTotal&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;They show a number of the Foreground/Background CPU Usage/per second. It didn't mean anything to me (probably because I know almost nothing about DBs). So I checked it up and it seems the dimention of this value is&amp;nbsp;&lt;SPAN&gt;CPU usage of foreground/background processes in centi seconds per second...&lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I hope it doesn't sound (too) stupid but as far as I know we have 100 centi seconds in a second, while the number shown by these metrics is in the range of 500-600-700 (of course constantly changing).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can someone explain to me what it actually means?&lt;BR /&gt;&lt;BR /&gt;Also, the other fun part is that the DB team who will use these data for performance analysis wants to see this CPU usage in % and not this strange value. Is there a similar metric that I can use or a way to aggregate it from this one? I assume it wouldn't be sufficient to have only the host CPU usage.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Georgi_Vuldzhev_0-1742488438425.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/27086iC7EC15F1D55EF820/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Georgi_Vuldzhev_0-1742488438425.png" alt="Georgi_Vuldzhev_0-1742488438425.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Thanks a lot to everyone who will ease my pain!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;All the best,&lt;BR /&gt;Georgi&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 16:35:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/OracleDB-metric-com-dynatrace-extension-sql-oracle-cpu/m-p/273087#M6061</guid>
      <dc:creator>Georgi_Vuldzhev</dc:creator>
      <dc:date>2025-03-20T16:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: OracleDB metric com.dynatrace.extension.sql-oracle.cpu.foregroundTotal</title>
      <link>https://community.dynatrace.com/t5/Extensions/OracleDB-metric-com-dynatrace-extension-sql-oracle-cpu/m-p/291900#M6949</link>
      <description>&lt;P&gt;Hi Georgi,&lt;/P&gt;
&lt;P&gt;The foreground and background CPU usage metrics are coming from this query:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;          SELECT
                DECODE(metric_name, 'Background CPU Usage Per Sec', gv$metric.value) AS background_cpu_usage,
                DECODE(metric_name, 'CPU Usage Per Sec', gv$metric.value) AS foreground_cpu_usage,
                gv$instance.instance_name
          FROM
                gv$metric JOIN gv$metricgroup
                  ON gv$metric.group_id = gv$metricgroup.group_id AND gv$metric.inst_id = gv$metricgroup.inst_id
                  AND gv$metric.metric_name IN ('Background CPU Usage Per Sec', 'CPU Usage Per Sec')
          JOIN gv$instance
                ON gv$instance.inst_id = gv$metric.inst_id&lt;/LI-CODE&gt;
&lt;P&gt;This is essentially going on the V$METRIC view and pulling what Oracle reports as CPU usage per second.&lt;/P&gt;
&lt;P&gt;Centiseconds per second tells you how many hundredths of CPU seconds you are using each second. It does not directly correspond to a percentage, since with multiple cores, you could have more than 100 CPU centiseconds being used. For example, if you have 4 cores, you could have CPU time up to 400 centiseconds in a second. This is similar to what UNIX reports as CPU time, if you are familiar with that concept.&lt;/P&gt;
&lt;P&gt;To get a percentage value, I would recommend either dividing the CPU usage metrics by the&amp;nbsp;com.dynatrace.extension.sql-oracle.cpu.cores metric, which gives you the number of CPU cores, or use the process CPU percentage metric reported by the OneAgent.&lt;/P&gt;
&lt;P&gt;Let me know if that cleared it up!&lt;/P&gt;
&lt;P&gt;Sorry for the late reply, this only made it to my desk today. But better late than never &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2025 09:28:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/OracleDB-metric-com-dynatrace-extension-sql-oracle-cpu/m-p/291900#M6949</guid>
      <dc:creator>TomásSeroteRoos</dc:creator>
      <dc:date>2025-12-19T09:28:01Z</dc:date>
    </item>
  </channel>
</rss>

