Installing OProfile with the IBM Advance Toolchain and the SDK

This topic documents the simplest path for installing OProfile with the IBM Advance Toolchain and the SDK on Power Systems servers.

About this task

OProfile is available with most Linux distros. If a newer version of the tool is required, it can be downloaded from the SourceForge repository, built, and installed on any Linux system. IBM® includes OProfile in the IBM Advance Toolchain for Linux on Power® packages that are hosted on the IBM Tools Repository. Complete these steps to set up the repository and install the latest IBM Advance Toolchain for Linux on Power packages and tools.

The latest OProfile package is available with the IBM Advance Toolchain for Linux on Power installation. Follow these steps to install the Advance Toolchain:

Procedure

  1. First, download and install the YUM repository configuration RPM. This package configures your Linux installation to automatically download and install packages using yum or zypper from the YUM repository.
    1. Go to the IBM Tools Repository for Linux on Power website at http://www14.software.ibm.com/webapp/set2/sas/f/lopdiags/yum.html.
    2. In the Configuration RPM file for YUM repository section, click the Configuration RPM file link to download it.
    3. Transfer the RPM file to the Power system.
    4. On the Power system, enter the following command to install the configuration RPM file:
      rpm -ivh ibm-power-repo-version.ppc.rpm
      Note:
      • Replace version with the version of the PowerLinux YUM repository configuration RPM file that you downloaded.
      • Root authority is typically required to install packages.
  2. Install the recommended service and utility tools for your distribution and IBM Power Systems server, as described on the IBM Tools Repository website. Replace package_name with the appropriate package name for your distribution and Power Systems server. For example, ibm-power-nonmanaged-rhel6.
    • For Red Hat Enterprise Linux, enter the following command:
      yum install package_name
    • For SUSE Linux Enterprise Server, enter the following command:
      zypper install package_name
  3. Install the latest IBM Advance Toolchain for Linux on Power packages. Advance Toolchain includes the most current version of OProfile.
    • For Red Hat Enterprise Linux, enter the following commands:
      yum install advance-toolchain-atversion-runtime 
      yum install advance-toolchain-atversion-devel 
      yum install advance-toolchain-atversion-perf
    • For SUSE Linux Enterprise Server, enter the following commands:
      zypper install advance-toolchain-atversion-runtime 
      zypper install advance-toolchain-atversion-devel 
      zypper install advance-toolchain-atversion-perf
    Replace version with the downloaded version of the IBM Advance Toolchain for Linux on Power. This step installs the three required IBM Advance Toolchain for Linux on Power RPM packages, in the correct order.

    For information about IBM Advance Toolchain for Linux on Power, see Advance Toolchain for Linux on Power.

  4. Optional: Install the latest IBM Software Development Kit for Linux on Power. IBM SDK for Linux on Power allows you to profile your applications with OProfile through an Eclipse-based interface.
    • For Red Hat Enterprise Linux, enter the following command:
      yum install ibm-sdk-lop
    • For SUSE Linux Enterprise Server, enter the following command:
      zypper install ibm-sdk-lop
    For information about IBM SDK for Linux on Power, see IBM Software Development Kit for Linux on Power (SDK).
  5. Update the path on your system to add the Advance Toolchain directory.
    • To update the path for a single session, enter the following commands:
      export PATH=/opt/atversion/bin:$PATH
      export MANPATH=/opt/atversion/share/man:$MANPATH
      Note: Replace version with the version of the Advance Toolchain that you downloaded.
    • To make these environment changes persistent, add these export commands to the users profile (for example, .bashrc) or to a system profile (for example, /etc/profile.d/ ). See your Linux distribution documentation for more information on how to properly set the values.
  6. Finally, to validate that the path changed and packages installed correctly, enter this sequence of commands:
    $ which operf ocount
      operf --version
      opreport --version 
     /opt/at9.0/bin/operf
      /opt/at9.0/bin/ocount
      operf: oprofile 1.1.0git compiled on Nov 18 2015 19:42:05
      opreport: oprofile 1.1.0git compiled on Nov 18 2015 19:41:53

    After completing these steps, you can use the OProfile tools, including the operf, ocount, and opreport commands.