<?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 How to use perf_event_open() function exposed by linux kernel to obtain RDT llc occupancy, local bandwidth and total bandwidth in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/How-to-use-perf-event-open-function-exposed-by-linux-kernel-to/m-p/1144059#M6715</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I am trying to read RDT counters, which are&lt;STRONG&gt; llc_occupancy,llc_local_bytes,total_bytes.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;These counters are available via perf list, as&amp;nbsp;&lt;STRONG&gt;&lt;SPAN style="font-size: 1em;"&gt;intel_cqm/llc_occupancy , intel_cqm/llc_local_bytes/,intel_cqm_total_bytes/&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I was able to read data via these counters using perf stat.&lt;/P&gt;

&lt;P&gt;How can I read these counter values for a specific process "P", using perf_event_open.&lt;/P&gt;

&lt;P&gt;I did the following, and it didn't help much&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;EM&gt; perf stat -e intel_cqm/llc_occupancy/ -a -p 5816 -vv&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;and used the same perf_event_attr parameters in the perf_event_open, and the api didn't get the counters.&lt;/P&gt;

&lt;P&gt;Also,&amp;nbsp;I noticed that, when I execute the above command, it returns with&amp;nbsp;&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;&amp;nbsp;sys_perf_event_open: pid 5816&amp;nbsp; cpu -1&amp;nbsp; group_fd -1&amp;nbsp; flags 0x8&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; sys_perf_event_open failed, error -22&lt;/P&gt;

&lt;P&gt;which is an invalid argument, however at the end of the command, it displays the llc occupancy.&lt;/P&gt;

&lt;P&gt;Is it possible to read the RDT counters for a specific process id?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Udaya Puvvadi&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2017 22:18:47 GMT</pubDate>
    <dc:creator>Udaya_P_</dc:creator>
    <dc:date>2017-10-19T22:18:47Z</dc:date>
    <item>
      <title>How to use perf_event_open() function exposed by linux kernel to obtain RDT llc occupancy, local bandwidth and total bandwidth</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/How-to-use-perf-event-open-function-exposed-by-linux-kernel-to/m-p/1144059#M6715</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I am trying to read RDT counters, which are&lt;STRONG&gt; llc_occupancy,llc_local_bytes,total_bytes.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;These counters are available via perf list, as&amp;nbsp;&lt;STRONG&gt;&lt;SPAN style="font-size: 1em;"&gt;intel_cqm/llc_occupancy , intel_cqm/llc_local_bytes/,intel_cqm_total_bytes/&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I was able to read data via these counters using perf stat.&lt;/P&gt;

&lt;P&gt;How can I read these counter values for a specific process "P", using perf_event_open.&lt;/P&gt;

&lt;P&gt;I did the following, and it didn't help much&lt;/P&gt;

&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;EM&gt; perf stat -e intel_cqm/llc_occupancy/ -a -p 5816 -vv&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;and used the same perf_event_attr parameters in the perf_event_open, and the api didn't get the counters.&lt;/P&gt;

&lt;P&gt;Also,&amp;nbsp;I noticed that, when I execute the above command, it returns with&amp;nbsp;&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;&amp;nbsp;sys_perf_event_open: pid 5816&amp;nbsp; cpu -1&amp;nbsp; group_fd -1&amp;nbsp; flags 0x8&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; sys_perf_event_open failed, error -22&lt;/P&gt;

&lt;P&gt;which is an invalid argument, however at the end of the command, it displays the llc occupancy.&lt;/P&gt;

&lt;P&gt;Is it possible to read the RDT counters for a specific process id?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Udaya Puvvadi&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 22:18:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/How-to-use-perf-event-open-function-exposed-by-linux-kernel-to/m-p/1144059#M6715</guid>
      <dc:creator>Udaya_P_</dc:creator>
      <dc:date>2017-10-19T22:18:47Z</dc:date>
    </item>
  </channel>
</rss>

