5 If you built Ceph from source and compiled Ceph for use with `oprofile`_
6 you can profile Ceph's CPU usage. See `Installing Oprofile`_ for details.
12 The first time you use ``oprofile`` you need to initialize it. Locate the
13 ``vmlinux`` image corresponding to the kernel you are now running. ::
17 sudo opcontrol --setup --vmlinux={path-to-image} --separate=library --callgraph=6
23 To start ``oprofile`` execute the following command::
27 Once you start ``oprofile``, you may run some tests with Ceph.
33 To stop ``oprofile`` execute the following command::
38 Retrieving oprofile Results
39 ===========================
41 To retrieve the top ``cmon`` results, execute the following command::
43 opreport -gal ./cmon | less
46 To retrieve the top ``cmon`` results with call graphs attached, execute the
49 opreport -cal ./cmon | less
51 .. important:: After reviewing results, you should reset ``oprofile`` before
52 running it again. Resetting ``oprofile`` removes data from the session
59 To reset ``oprofile``, execute the following command::
61 sudo opcontrol --reset
63 .. important:: You should reset ``oprofile`` after analyzing data so that
64 you do not commingle results from different tests.
66 .. _oprofile: http://oprofile.sourceforge.net/about/
67 .. _Installing Oprofile: ../../../dev/cpu-profiler