Skip to main content



Resource analysis tools

developerWorks

Linux standard tools Other system tools
   HOWTO & tools  |   Presentations

pstree / ps
top
vmstat
sysstat
OProfile




Resource management tools help you monitor performance and identify performance issues. There are many ways to collect the system data you need to investigate performance problems.

Linux standard tools are available on every Linux distribution.

pstree / ps

'pstree' shows the dependencies and relationships of applications. Similar to 'ps -eafx'.

Example:

user@pserver1:~> pstree
     ...
     |-4*[nfsd]
     |-nmbd
     |-nscd---nscd---5*[nscd]
     |-ntpd
     |-portmap
     |-rpc.mountd
     |-rpc.statd
     |-safe_mysqld---mysqld---mysqld---mysqld
     |-2*[screen---bash]
     |-scsi_eh_0
     |-scsi_eh_1
     |-smbd
     |-sshd-+-2*[sshd---sshd---bash---vim]
     |      |-sshd---sshd---bash---su---bash
     |      `-sshd---sshd---bash---pstree
     `-syslogd

Back to top


top

'top' prints out system data per process. It shows an overview on the currently running system processes. The top command itself consumes CPU resources.

Example:

[user@pserver1]$ top
        1:40pm  up  3:17, 11 users,  load average: 0.00, 0.02, 0.03
        134 processes: 127 sleeping, 6 running, 1 zombie, 0 stopped
        CPU states:  1.9% user,  1.7% system,  0.0% nice, 96.2% idle
        Mem:  1030464K av,  675028K used,  355436K free,       0K shrd,  156256K buff
        Swap: 1663160K av,       0K used, 1663160K free                  296068K cached

        PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
        1746 wolf      15   0 54772  14M 11600 R     1.1  1.4   0:00 kdeinit
        6147 wolf      15   0  1080 1080   840 R     0.9  0.1   0:00 top

Print the output of the 'top' command to a file:

top d 4 b i > out
        d       refresh rate in seconds
        b               batch
        i               only active processes

Back to top


vmstat

Retrieves data directly from the 'proc'-filesystem ('/proc') and prints them to the screen. It shows the system utilization (CPU/Memory/ I/O).

Example:

[user@pserver1]$ vmstat 3
   procs                      memory    swap          io     system         cpu
 r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy  id
 0  0  0      0 663248  24204 196816   0   0    66    32  582   663   4   1  95
 0  0  0      0 663248  24220 196816   0   0     0    56  555   493   2   1  97
 0  0  0      0 663248  24220 196816   0   0     0     0  548   482   1   0  99
 0  0  0      0 663248  24228 196816   0   0     0     4  549   493   1   1  98

Back to top


sysstat

Package

This package consists of several Linux tools to collect system data.
Open source package: http://perso.wanadoo.fr/sebastien.godard/
Recompile the package on Linux on System z to use it.
For our measurements we used version 6.0.2 as contained in SLES9 and RHEL4.

The 'sysstat' package consists of the following components:

  • 'sadc' data gatherer, stores data in binary file
  • 'sar' reporting tool, reads binary file created with 'sadc' and converts it to readable output
  • 'mpstat' processor utilization
  • 'iostat' I/O utilization
Usage of sadc
Start
/usr/lib/sa/sadc [interval [count]] [outputfile]
Example
machine1:~ # /usr/lib/sa/sadc 4 2 sadc.outfile
Stop
'killall sadc' or 'kill procnr'
Usage of sar
Creating report with all options
sar -A -f <sadc-outputfile> <outputfile>
Example
machine1:~ # sar -A -f sadc.outfile > sar.outfile
machine1:~ # cat sar.outfile 
Linux 2.6.5-7.252-s390x (testserver) 	04/25/06

15:54:51       proc/s
15:54:55         0.00
15:54:59         0.00
Average:         0.00

15:54:51      cswch/s
15:54:55         9.48
15:54:59         9.50
Average:         9.48

15:54:51          CPU     %user     %nice   %system   %iowait     %idle
15:54:55          all      0.00      0.00      0.00      0.00    100.00
15:54:55            0      0.00      0.00      0.00      0.00    100.00
15:54:55            1      0.00      0.00      0.00      0.00    100.00
15:54:55            2      0.00      0.00      0.00      0.00    100.00
15:54:55            3      0.00      0.00      0.00      0.00    100.00
15:54:55            4      0.00      0.00      0.00      0.00    100.00
15:54:55            5      0.00      0.00      0.00      0.00    100.00
15:54:55            6      0.00      0.00      0.00      0.00    100.00
15:54:55            7      0.00      0.00      0.00      0.00    100.00
15:54:59          all      0.00      0.00      0.00      0.00    100.00
15:54:59            0      0.00      0.00      0.00      0.00    100.00
15:54:59            1      0.00      0.00      0.00      0.00    100.00
15:54:59            2      0.00      0.00      0.00      0.00    100.00
15:54:59            3      0.00      0.00      0.00      0.00    100.00
15:54:59            4      0.00      0.00      0.00      0.00    100.00
15:54:59            5      0.00      0.00      0.00      0.00    100.00
15:54:59            6      0.00      0.00      0.00      0.00    100.00
15:54:59            7      0.00      0.00      0.00      0.00    100.00
Average:          all      0.00      0.00      0.00      0.00    100.00
Average:            0      0.00      0.00      0.00      0.00    100.00
Average:            1      0.00      0.00      0.00      0.00    100.00
Average:            2      0.00      0.00      0.00      0.00    100.00
Average:            3      0.00      0.00      0.00      0.00    100.00
Average:            4      0.00      0.00      0.00      0.00    100.00
Average:            5      0.00      0.00      0.00      0.00    100.00
Average:            6      0.00      0.00      0.00      0.00    100.00
Average:            7      0.00      0.00      0.00      0.00    100.00

15:54:51         INTR    intr/s
15:54:55          sum    800.25
15:54:59          sum    800.75
Average:          sum    800.25

15:54:51     CPU
15:54:55       0
15:54:55       1
15:54:55       2
15:54:55       3
15:54:55       4
15:54:55       5
15:54:55       6
15:54:55       7
15:54:59       0
15:54:59       1
15:54:59       2
15:54:59       3
15:54:59       4
15:54:59       5
15:54:59       6
15:54:59       7
Average:       0
Average:       1
Average:       2
Average:       3
Average:       4
Average:       5
Average:       6
Average:       7

15:54:51     pswpin/s pswpout/s
15:54:55         0.00      0.00
15:54:59         0.00      0.00
Average:         0.00      0.00

15:54:51          tps      rtps      wtps   bread/s   bwrtn/s
15:54:55         0.00      0.00      0.00      0.00      0.00
15:54:59         0.00      0.00      0.00      0.00      0.00
Average:         0.00      0.00      0.00      0.00      0.00

15:54:51      frmpg/s   bufpg/s   campg/s
15:54:55        46.13      0.00      0.00
15:54:59        42.25      0.00      0.00
Average:        46.13      0.00      0.00

15:54:51        IFACE   rxpck/s   txpck/s   rxbyt/s   txbyt/s   rxcmp/s   txcmp/s  rxmcst/s
15:54:55           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:55         eth0      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:55         eth1      1.25      0.25    352.37     33.42      0.00      0.00      1.25
15:54:55         sit0      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:59           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:59         eth0      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:59         eth1      0.75      0.25    152.00     33.50      0.00      0.00      0.75
15:54:59         sit0      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         eth0      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         eth1      1.25      0.25    352.37     33.42      0.00      0.00      1.25
Average:         sit0      0.00      0.00      0.00      0.00      0.00      0.00      0.00

15:54:51        IFACE   rxerr/s   txerr/s    coll/s  rxdrop/s  txdrop/s  txcarr/s  rxfram/s  rxfifo/s  txfifo/s
15:54:55           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:55         eth0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:55         eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:55         sit0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:59           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:59         eth0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:59         eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
15:54:59         sit0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         eth0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         eth1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         sit0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

15:54:51          DEV       tps  rd_sec/s  wr_sec/s
15:54:55       dev1-0      0.00      0.00      0.00
15:54:55       dev1-1      0.00      0.00      0.00
15:54:55       dev1-2      0.00      0.00      0.00
15:54:55       dev1-3      0.00      0.00      0.00
15:54:55       dev1-4      0.00      0.00      0.00
15:54:55       dev1-5      0.00      0.00      0.00
15:54:55       dev1-6      0.00      0.00      0.00
15:54:55       dev1-7      0.00      0.00      0.00
15:54:55       dev1-8      0.00      0.00      0.00
15:54:55       dev1-9      0.00      0.00      0.00
15:54:55      dev1-10      0.00      0.00      0.00
15:54:55      dev1-11      0.00      0.00      0.00
15:54:55      dev1-12      0.00      0.00      0.00
15:54:55      dev1-13      0.00      0.00      0.00
15:54:55      dev1-14      0.00      0.00      0.00
15:54:55      dev1-15      0.00      0.00      0.00
15:54:55       dev7-0      0.00      0.00      0.00
15:54:55       dev7-1      0.00      0.00      0.00
15:54:55       dev7-2      0.00      0.00      0.00
15:54:55       dev7-3      0.00      0.00      0.00
15:54:55       dev7-4      0.00      0.00      0.00
15:54:55       dev7-5      0.00      0.00      0.00
15:54:55       dev7-6      0.00      0.00      0.00
15:54:55       dev7-7      0.00      0.00      0.00
15:54:55       dev9-0      0.00      0.00      0.00
15:54:55      dev94-0      0.00      0.00      0.00
15:54:55      dev94-4      0.00      0.00      0.00
15:54:55      dev94-8      0.00      0.00      0.00
15:54:55     dev94-12      0.00      0.00      0.00
15:54:55     dev94-16      0.00      0.00      0.00
15:54:55     dev94-20      0.00      0.00      0.00
15:54:55     dev94-24      0.00      0.00      0.00
15:54:55     dev94-28      0.00      0.00      0.00
15:54:55     dev94-32      0.00      0.00      0.00
15:54:55     dev94-36      0.00      0.00      0.00
15:54:55     dev94-40      0.00      0.00      0.00
15:54:55     dev94-44      0.00      0.00      0.00
15:54:55     dev94-48      0.00      0.00      0.00
15:54:55     dev94-52      0.00      0.00      0.00
15:54:55     dev94-56      0.00      0.00      0.00
15:54:55     dev94-60      0.00      0.00      0.00
15:54:55     dev94-64      0.00      0.00      0.00
15:54:55     dev94-68      0.00      0.00      0.00
15:54:55     dev94-72      0.00      0.00      0.00
15:54:55     dev94-76      0.00      0.00      0.00
15:54:55     dev94-80      0.00      0.00      0.00
15:54:55     dev94-84      0.00      0.00      0.00
15:54:55     dev253-0      0.00      0.00      0.00
15:54:59       dev1-0      0.00      0.00      0.00
15:54:59       dev1-1      0.00      0.00      0.00
15:54:59       dev1-2      0.00      0.00      0.00
15:54:59       dev1-3      0.00      0.00      0.00
15:54:59       dev1-4      0.00      0.00      0.00
15:54:59       dev1-5      0.00      0.00      0.00
15:54:59       dev1-6      0.00      0.00      0.00
15:54:59       dev1-7      0.00      0.00      0.00
15:54:59       dev1-8      0.00      0.00      0.00
15:54:59       dev1-9      0.00      0.00      0.00
15:54:59      dev1-10      0.00      0.00      0.00
15:54:59      dev1-11      0.00      0.00      0.00
15:54:59      dev1-12      0.00      0.00      0.00
15:54:59      dev1-13      0.00      0.00      0.00
15:54:59      dev1-14      0.00      0.00      0.00
15:54:59      dev1-15      0.00      0.00      0.00
15:54:59       dev7-0      0.00      0.00      0.00
15:54:59       dev7-1      0.00      0.00      0.00
15:54:59       dev7-2      0.00      0.00      0.00
15:54:59       dev7-3      0.00      0.00      0.00
15:54:59       dev7-4      0.00      0.00      0.00
15:54:59       dev7-5      0.00      0.00      0.00
15:54:59       dev7-6      0.00      0.00      0.00
15:54:59       dev7-7      0.00      0.00      0.00
15:54:59       dev9-0      0.00      0.00      0.00
15:54:59      dev94-0      0.00      0.00      0.00
15:54:59      dev94-4      0.00      0.00      0.00
15:54:59      dev94-8      0.00      0.00      0.00
15:54:59     dev94-12      0.00      0.00      0.00
15:54:59     dev94-16      0.00      0.00      0.00
15:54:59     dev94-20      0.00      0.00      0.00
15:54:59     dev94-24      0.00      0.00      0.00
15:54:59     dev94-28      0.00      0.00      0.00
15:54:59     dev94-32      0.00      0.00      0.00
15:54:59     dev94-36      0.00      0.00      0.00
15:54:59     dev94-40      0.00      0.00      0.00
15:54:59     dev94-44      0.00      0.00      0.00
15:54:59     dev94-48      0.00      0.00      0.00
15:54:59     dev94-52      0.00      0.00      0.00
15:54:59     dev94-56      0.00      0.00      0.00
15:54:59     dev94-60      0.00      0.00      0.00
15:54:59     dev94-64      0.00      0.00      0.00
15:54:59     dev94-68      0.00      0.00      0.00
15:54:59     dev94-72      0.00      0.00      0.00
15:54:59     dev94-76      0.00      0.00      0.00
15:54:59     dev94-80      0.00      0.00      0.00
15:54:59     dev94-84      0.00      0.00      0.00
15:54:59     dev253-0      0.00      0.00      0.00
Average:       dev1-0      0.00      0.00      0.00
Average:       dev1-1      0.00      0.00      0.00
Average:       dev1-2      0.00      0.00      0.00
Average:       dev1-3      0.00      0.00      0.00
Average:       dev1-4      0.00      0.00      0.00
Average:       dev1-5      0.00      0.00      0.00
Average:       dev1-6      0.00      0.00      0.00
Average:       dev1-7      0.00      0.00      0.00
Average:       dev1-8      0.00      0.00      0.00
Average:       dev1-9      0.00      0.00      0.00
Average:      dev1-10      0.00      0.00      0.00
Average:      dev1-11      0.00      0.00      0.00
Average:      dev1-12      0.00      0.00      0.00
Average:      dev1-13      0.00      0.00      0.00
Average:      dev1-14      0.00      0.00      0.00
Average:      dev1-15      0.00      0.00      0.00
Average:       dev7-0      0.00      0.00      0.00
Average:       dev7-1      0.00      0.00      0.00
Average:       dev7-2      0.00      0.00      0.00
Average:       dev7-3      0.00      0.00      0.00
Average:       dev7-4      0.00      0.00      0.00
Average:       dev7-5      0.00      0.00      0.00
Average:       dev7-6      0.00      0.00      0.00
Average:       dev7-7      0.00      0.00      0.00
Average:       dev9-0      0.00      0.00      0.00
Average:      dev94-0      0.00      0.00      0.00
Average:      dev94-4      0.00      0.00      0.00
Average:      dev94-8      0.00      0.00      0.00
Average:     dev94-12      0.00      0.00      0.00
Average:     dev94-16      0.00      0.00      0.00
Average:     dev94-20      0.00      0.00      0.00
Average:     dev94-24      0.00      0.00      0.00
Average:     dev94-28      0.00      0.00      0.00
Average:     dev94-32      0.00      0.00      0.00
Average:     dev94-36      0.00      0.00      0.00
Average:     dev94-40      0.00      0.00      0.00
Average:     dev94-44      0.00      0.00      0.00
Average:     dev94-48      0.00      0.00      0.00
Average:     dev94-52      0.00      0.00      0.00
Average:     dev94-56      0.00      0.00      0.00
Average:     dev94-60      0.00      0.00      0.00
Average:     dev94-64      0.00      0.00      0.00
Average:     dev94-68      0.00      0.00      0.00
Average:     dev94-72      0.00      0.00      0.00
Average:     dev94-76      0.00      0.00      0.00
Average:     dev94-80      0.00      0.00      0.00
Average:     dev94-84      0.00      0.00      0.00
Average:     dev253-0      0.00      0.00      0.00

15:54:51     pgpgin/s pgpgout/s   fault/s  majflt/s
15:54:55         0.00      0.00      5.49      0.00
15:54:59         0.00      0.00      5.50      0.00
Average:         0.00      0.00      5.49      0.00

15:54:51    kbmemfree kbmemused  %memused kbbuffers  kbcached kbswpfree kbswpused  %swpused  kbswpcad
15:54:55      1902900    147268      7.18      3484     36764   1452184         0      0.00         0
15:54:59      1903576    146592      7.15      3484     36764   1452184         0      0.00         0
Average:      1903238    146930      7.17      3484     36764   1452184         0      0.00         0

15:54:51    dentunusd   file-sz  inode-sz  super-sz %super-sz  dquot-sz %dquot-sz  rtsig-sz %rtsig-sz
15:54:55        42453         0     45983         0      0.00         0      0.00         0      0.00
15:54:59        42453         0     45983         0      0.00         0      0.00         0      0.00
Average:        42453         0     45983         0      0.00         0      0.00         0      0.00

15:54:51       totsck    tcpsck    udpsck    rawsck   ip-frag
15:54:55          145         2         2         0         0
15:54:59          145         2         2         0         0
Average:          145         2         2         0         0

15:54:51      runq-sz  plist-sz   ldavg-1   ldavg-5  ldavg-15
15:54:55            0        61      0.20      0.12      0.08
15:54:59            0        61      0.19      0.12      0.08
Average:            0        61      0.20      0.12      0.08

'sar' prints out the following information:
  • process creation,
  • context switching,
  • all/single CPU utilization,
  • memory utilization,
  • network utilization,
  • disk statistics ... and more

The manual describes the 'sar' command in detail. To see it, enter 'man sar'.


Back to top


OProfile

OProfile offers profiling of all running code on Linux systems, providing a variety of statistics. It is released under the GNU GPL. OProfiler consists of a kernel driver and a daemon for collecting sample data, and tools for information generation. For a documentation of the OProfile commands see http://oprofile.sourceforge.net/docs/.

Installation for SUSE Linux
  1. Check that you have at least a SLES9 SP2 installed including the OProfile kernel module; this is at least kernel level kernel-s390(x)-2.6.5-7.191.
  2. Be sure to have installed the packages popt-devel and qt3-devel as contained with kernel-s390(x)-2.6.5-7.191.
  3. Download the latest release of the OProfile user space tools from http://oprofile.sourceforge.net/download/.
  4. Extract the source of the OProfile user space tools to the current directory:
    tar xvzf oprofile-0.9.1.tar.gz
  5. Change to the OProfile source directory:
    cd oprofile-0.9.1
  6. Configure the make files and the build environment:
    ./configure -–with-kernel-support –-with-qt-libraries=/usr/lib/qt3/lib64
    or ./configure –-with-kernel-support -–with-qt-libraries=/usr/lib/qt3/lib for a 31-bit distribution
  7. make
  8. make install
Prerequisites for RedHat Linux
  • Check that you have at least a RHEL4 U2 installed including the OProfile kernel module; this is at least kernel level kernel-2.6.9-22.EL.
  • Be sure to have installed the package oprofile-0.8.1-21 as contained with kernel-2.6.9-22.EL.
Usage

The OProfile user space tools require to switch on the hertz timer with the sysctl command
sysctl -w kernel.hz_timer=1

If the system is configured to not to run with hertz timer, disable the hertz timer after profiling with
sysctl -w kernel.hz_timer=0
.

Example: Generating a simple system overview

sysctl -w kernel.hz_timer=1
gunzip /boot/vmlinux-2.6.5-7.201-s390x.gz

tar cvzf myrunnumber.tgz /tmp/myrunnumber

opcontrol --vmlinux=/boot/vmlinux-2.6.5-7.201-s390x
opcontrol --start

<DO TEST>

opcontrol --shutdown
opreport

Output:


CPU: CPU with timer interrupt, speed 0 MHz (estimated)
Profiling through timer interrupt
TIMER:0|
samples| %|
------------------
167091 99.7130 vmlinux-2.6.5-7.201-s390x
51 0.0304 libc.so.6
26 0.0155 ld-2.3.3.so
12 0.0072 oprofiled
8 0.0048 bash
6 0.0036 libnss_files.so.2
5 0.0030 libhasgen10.so
4 0.0024 libclntsh.so.10.1
4 0.0024 scsi_mod
3 0.0018 jbd
2 0.0012 dm_mod
2 0.0012 libcrypto.so.0.9.7
1 6.0e-04 ls
1 6.0e-04 dasd_mod
1 6.0e-04 libreadline.so.4.3
1 6.0e-04 oprofile

Example: Resolving function utilization

sysctl -w kernel.hz_timer=1
gunzip /boot/vmlinux-2.6.5-7.201-s390x.gz

tar cvzf myrunnumber.tgz /tmp/myrunnumber

opcontrol --vmlinux=/boot/vmlinux-2.6.5-7.201-s390x
opcontrol --start

<DO TEST>

opcontrol --shutdown
opreport -l

Output:

warning: /dasd_mod could not be found.
warning: /dm_mod could not be found.
warning: /jbd could not be found.
warning: /oprofile could not be found.
warning: /scsi_mod could not be found.
CPU: CPU with timer interrupt, speed 0 MHz (estimated)
Profiling through timer interrupt
samples % app name symbol name
165525 98.7784 vmlinux-2.6.5-7.201-s390x default_idle
516 0.3079 vmlinux-2.6.5-7.201-s390x shmem_getpage
160 0.0955 vmlinux-2.6.5-7.201-s390x buffered_rmqueue
128 0.0764 vmlinux-2.6.5-7.201-s390x do_page_exception
96 0.0573 vmlinux-2.6.5-7.201-s390x do_no_page
86 0.0513 vmlinux-2.6.5-7.201-s390x add_to_page_cache
62 0.0370 vmlinux-2.6.5-7.201-s390x find_lock_page
57 0.0340 vmlinux-2.6.5-7.201-s390x handle_mm_fault
54 0.0322 vmlinux-2.6.5-7.201-s390x shmem_swp_entry
53 0.0316 vmlinux-2.6.5-7.201-s390x page_add_rmap
42 0.0251 vmlinux-2.6.5-7.201-s390x shmem_swp_alloc
38 0.0227 vmlinux-2.6.5-7.201-s390x shmem_dir_map
27 0.0161 vmlinux-2.6.5-7.201-s390x shmem_nopage
26 0.0155 vmlinux-2.6.5-7.201-s390x __alloc_pages
23 0.0137 vmlinux-2.6.5-7.201-s390x release_pages
20 0.0119 vmlinux-2.6.5-7.201-s390x unlock_page
18 0.0107 ld-2.3.3.so do_lookup_x
18 0.0107 vmlinux-2.6.5-7.201-s390x copy_page_range
17 0.0101 vmlinux-2.6.5-7.201-s390x __pagevec_lru_add
13 0.0078 libc.so.6 mbrtowc
13 0.0078 vmlinux-2.6.5-7.201-s390x pte_alloc_map
10 0.0060 libc.so.6 __gconv_transform_utf8_internal
10 0.0060 vmlinux-2.6.5-7.201-s390x bad_range
10 0.0060 vmlinux-2.6.5-7.201-s390x mark_page_accessed
9 0.0054 vmlinux-2.6.5-7.201-s390x page_waitqueue
9 0.0054 vmlinux-2.6.5-7.201-s390x radix_tree_preload
...
1 6.0e-04 dasd_mod (no symbols)
...

 

The preceding warnings can be resolved by adding the option --image-path to opreport. See the following example.

Example: Resolving module dependencies

sysctl -w kernel.hz_timer=1
gunzip /boot/vmlinux-2.6.5-7.201-s390x.gz
tar cvzf myrunnumber.tgz /tmp/myrunnumber

opcontrol --vmlinux=/boot/vmlinux-2.6.5-7.201-s390x
opcontrol --start

<DO TEST>

opcontrol --shutdown
opreport -l --image-path=/lib/modules/2.6.5-7.201-s390x/kernel/drivers/s390/block/,/lib/modules/2.6.5-7.201-s390x/kernel/drivers/md,....

Output:

CPU: CPU with timer interrupt, speed 0 MHz (estimated)
Profiling through timer interrupt
warning: could not check that the binary file /lib/modules/2.6.5-7.201-s390x/kernel/drivers/s390/block/dasd_mod.ko has not been modified since the profile was taken. Results may be inaccurate.
samples % image name app name symbol name
165525 98.7784 vmlinux-2.6.5-7.201-s390x vmlinux-2.6.5-7.201-s390x default_idle
516 0.3079 vmlinux-2.6.5-7.201-s390x vmlinux-2.6.5-7.201-s390x shmem_getpage
160 0.0955 vmlinux-2.6.5-7.201-s390x vmlinux-2.6.5-7.201-s390x buffered_rmqueue
128 0.0764 vmlinux-2.6.5-7.201-s390x vmlinux-2.6.5-7.201-s390x do_page_exception
...
1 6.0e-04 dasd_mod.ko dasd_mod dasd_change_state
...

Example: Archiving oprofile samples

sysctl -w kernel.hz_timer=1
gunzip /boot/vmlinux-2.6.5-7.201-s390x.gz
opcontrol --vmlinux=/boot/vmlinux-2.6.5-7.201-s390x
opcontrol --start

<DO TEST>

opcontrol --shutdown
oparchive --image=/lib/modules/2.6.5-7.201-s390x -o /tmp/myarchive

tar cvzf myarchive.tgz /tmp/myarchive


Back to top


If you use any software from this web site please be aware of the Warranty Disclaimer and Limitation of Liability.

Team
Please address any comments to the performance team: linux390@de.ibm.com