Announcement

Collapse
No announcement yet.

Attempting to get Perf Counter Metrics via Perf Module

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Attempting to get Perf Counter Metrics via Perf Module

    I would like to have Perf metrics included with my test results - however I cannot figure out how to make this happen. I want to mimic an example in an article by Michael Larabel where the Perf module reported task clock, number of context switches, page faults, branches, and branch misses another with the test results. In documentation and several places in the forums I have seen you should be able to load the Perf module simply by setting the environment variable, LINUX_PERF=1. This is not working for me.

    Following the examples I tried running commands like: "$ LINUX_PERF=1 phoronix-test-suite run pts/encode-mp3" with no success. I tried setting the environment var using export, verifying it was set, then starting the test - still without success. I do not see any errors in the phoronix logs nor system logs. Perf *is* installed and accessible via normal system paths:
    $ which perf
    /usr/bin/perf

    Am I missing something obvious? Any pointers to what to try will be greatly appreciated.

  • #2
    I've figured out my problem. I had to edit the user config file (/etc/phoronix-test-suite.xml in my case) to add linux_perf to the "LoadModules" section. After this change I was able to get the perf metrics attached to the test results as expected with just setting the environment variable, LINUX_PERF=1.

    Just as a note, I did not see this mentioned anywhere in the documentation so it could probably be more clear.

    Comment


    • #3
      Now I want to be able to trigger a test run from Phoromatic and still use the perf module. Is this possible to do?

      Intuitively it seems I should be able to have the environment variable set on the client(s) then schedule a test through Phoromatic. However, when I try that, my results do not include the perf metrics. It seems that when Phoromatic initiates the phoronix-test-suite command on my client (i.e. when a test schedule is triggered), a different environment is used than when I run the phoronix-test-suite command on that same client locally as root. Is there a way I can set LINUX_PERF=1 in this 'phoromatic environment'?

      Comment


      • #4
        Originally posted by blearn View Post
        I've figured out my problem. I had to edit the user config file (/etc/phoronix-test-suite.xml in my case) to add linux_perf to the "LoadModules" section. After this change I was able to get the perf metrics attached to the test results as expected with just setting the environment variable, LINUX_PERF=1.

        Just as a note, I did not see this mentioned anywhere in the documentation so it could probably be more clear.
        Hmmm, usually you shouldn't need to add linux_perf to the LoadModules. Will do some testing this weekend to see if I can reproduce the problem. What version of PTS are you running? Generally you should just need to use the environment variable.
        Michael Larabel
        http://www.michaellarabel.com/

        Comment


        • #5
          Originally posted by blearn View Post
          Now I want to be able to trigger a test run from Phoromatic and still use the perf module. Is this possible to do?

          Intuitively it seems I should be able to have the environment variable set on the client(s) then schedule a test through Phoromatic. However, when I try that, my results do not include the perf metrics. It seems that when Phoromatic initiates the phoronix-test-suite command on my client (i.e. when a test schedule is triggered), a different environment is used than when I run the phoronix-test-suite command on that same client locally as root. Is there a way I can set LINUX_PERF=1 in this 'phoromatic environment'?
          At the moment there isn't an easy way to do so. Short of setting the environment variable locally or modifying the user configuration file (when running as root, it's at /etc/phoronix-test-suite.xml). But in the weeks ahead I've been planning on making it an easier way to activate modules for PTS clients via the Phoromatic UI.... Feel free to ping again here in two weeks or so if I forget or don't post an update here.
          Michael Larabel
          http://www.michaellarabel.com/

          Comment


          • #6
            Originally posted by Michael View Post

            Hmmm, usually you shouldn't need to add linux_perf to the LoadModules. Will do some testing this weekend to see if I can reproduce the problem. What version of PTS are you running? Generally you should just need to use the environment variable.
            Sorry, I didn't notice your first response. I am using version 7.0.1 of PTS. I believe I *may* have been hitting the same issue in version 7.2.1 before I reverted to 7.0.1 and found the solution.

            Comment

            Working...
            X