Linux performance monitoring software (Perf, PAPI) Installation tutorial, perfpapi
Perf
Perf is a built-in Linux kernel performance tool. The installation process is as follows:
1. Download a Linux kernel source code and decompress it into tools/perf.
2. Open the terminal and install make & make install.
3. After installation, you can run the perf program in this folder, such as./perf stat ls.
4. However, performance analysis can be performed on any program. Therefore, you need to configure environment variables so that perf can run as needed.
5. Terminal input: echo $ PATH. We can see the default directories of all commands in the system (the directories are separated by colons). We can select a directory to copy the executable files of perf to it, usually put in: /usr/local/bin.
6. In this way, we can execute the perf command in other files, such as perf stat./run. (Run is a target execution Program)
PAPI
PAPI (Performance ApplicationProgramming Interface), installation is also very simple.
The premise is that the perfctr module is installed.
Install the PAPI root directory.
PerfSuite
Install the following software before installation.
1. # sudo apt-get installlibexpat-dev.
2. # sudo apt-get install tcl.
3. # sudo apt-get install tk.
4. # sudo apt-get install tdom.
5. # sudo apt-get install binutils-dev.
6. # sudo apt-get install gfortran.
7. #./configure
Note that if an error occurs, it indicates that the default installation path is incorrect and you need to specify it (based on your directory location ):
. /Configure -- prefix =/home/ccc/perfsuite-1.0.0b1/-- with-papi =/home/ccc/papi-4.1.2.1/-- with-tdom =/usr/lib/tcltk/tdom0.8.3/-- -kernel-srcdir =/usr/src/linux-2.6.36.2-change/> output
8. # make
9. # make-s check
10. # make install