ocount(1)


NAME

   ocount - Event counting tool for Linux

SYNOPSIS

   ocount  [ options ] [ --system-wide | --process-list <pids> | --thread-
   list <tids> | --cpu-list <cpus> | [ command [ args ] ] ]

DESCRIPTION

   ocount is an OProfile tool that can be used to  count  native  hardware
   events  occurring  in either a given application, a set of processes or
   threads, a subset of active system processors, or  the  entire  system.
   The  data collected during a counting session is displayed to stdout by
   default or, optionally, to a file.

   When counting multiple events, the kernel may not be able to count  all
   events  simultaneously and, thus, may need to multiplex the counting of
   the events.  If this happens, the "Percent time enabled" column in  the
   ocount output will be less than 100, but counts are scaled up to a 100%
   estimated value.

RUN MODES

   One (and only one) of the following run modes must  be  specified.   If
   you run ocount using a run mode other than command [args] , press Ctrl-
   c to stop ocount when  finished  counting  (e.g.,  when  the  monitored
   process  ends).   If you background ocount (i.e., with '&') while using
   one these run modes, you must stop it in a controlled  manner  so  that
   the  data collection process can be shut down cleanly and final results
   can be displayed. Use kill -SIGINT <ocount-PID> for this purpose.

   command [args]
          The command is the application for which to count events.   args
          are  the  input  arguments  required  by  the  application.  The
          command and its arguments must be positioned at the end  of  the
          command line, after all ocount options.

   --process-list / -p pids
          Use  this option to count events for one or more already-running
          applications, specified via a comma-separated  list  (  pids  ).
          Event  counts  will  be collected for all children of the passed
          process(es) as well. You must have privileges for  the  user  ID
          under  which  the specified process(es) are running; e.g., for a
          non-root user, the user ID of the process(es)  is  the  same  as
          that  used  for running ocount. A lack of privileges will result
          in the following failure message:
                  perf_event_open failed with Permission denied

   --thread-list / -r tids
          Use this option to count events for one or more  already-running
          threads,  specified  via  a comma-separated list ( tids ). Event
          counts will not be collected for  any  children  of  the  passed
          thread(s).  See  the  description  of  --process-list concerning
          required privileges.

   --system-wide / -s
          This option is for counting events for all processes running  on
          your system.  You must have root authority to run ocount in this
          mode.

   --cpu-list / -C cpus
          This option is for counting events on a subset of processors  on
          your  system. You must have root authority to run ocount in this
          mode. This is a comma-separated list, where each element in  the
          list  may  be  either  a  single  processor number or a range of
          processor numbers; for example: '-C 2,3,4-11,15'.

OTHER OPTIONS

   --events / -e event1[,event2[,...]]
          This option is for  passing  a  comma-separated  list  of  event
          specifications for counting. Each event spec is of the form:
             name[:unitmask[:kernel[:user]]]
          Note:  Do  not  include a count value in the event spec, as that
          parameter is only needed when profiling.

          You can specify unitmask values using either a  numerical  value
          (hex  values  must  begin  with "0x") or a symbolic name (if the
          name=<um_name> field is shown in the ophelp  output).  For  some
          named  unit  masks,  the hex value is not unique; thus, OProfile
          tools enforce specifying such unit masks value by name.   If  no
          unit  mask  is  specified,  the  default unit mask value for the
          event is used.

          The kernel and user parts of the event specification are  binary
          values ('1' or '0') indicating whether or not to count events in
          kernel space and user space.
          Note: In order to specify the kernel/user bits,  you  must  also
          specify  a  unitmask  value,  even if the running processor type
          does not use unit masks --- in which case, use the  value  '0'  to
          signify a null unit mask; for example:
             -e INST_RETIRED_ANY_P:0:1:0
                                   ^ ^ ^
                                   |  |  |--- '0': do not count user space
          events
                                   | |-- '1': count kernel space events
                                   |-- '0': the null unit mask

          Event names  for  certain  processor  types  include  a  _GRP<n>
          suffix.   For  such  cases, the --events option may be specified
          with or without the _GRP<n> suffix.

          When no event specification is given, the default event for  the
          running processor type will be used for counting.  Use ophelp to
          list the available events for your processor type.

   --separate-thread / -t
          This  option  can  be  used  in  conjunction  with  either   the
          --process-list  or  --thread-list option to display event counts
          on a per-thread (per-process) basis.  Without this  option,  all
          counts are aggregated.

          NOTE:  If  new  threads  are  started  by  the process(es) being
          monitored after counting begins, the counts  for  those  threads
          are aggregated with their parent's counts.

   --separate-cpu / -c
          This option can be used in conjunction with either the --system-
          wide or --cpu-list option to display event counts on  a  per-cpu
          basis.  Without this option, all counts are aggregated.

   --time-interval / -i interval_length[:num_intervals]

          Note: The interval_length is given in milliseconds. However, the
          current implementation only supports 100 ms granularity, so  the
          given  interval_length  will  be  rounded to the nearest 100 ms.
          Results collected for each time interval are printed immediately
          instead of the default of one dump of cumulative event counts at
          the end of the run.  Counters are reset to zero at the start  of
          each interval.

          If  num_intervals is specified, ocount exits after the specified
          number of intervals occur.

   --brief-format / -b
          Use this option to print results in the following brief format:
              [cpu                                                      or
          thread,]<event_name>[:umask[:K:U]],<count>,<percent_time_enabled>
              [     <u32>     ,]<   string   >[<  u32>[<bb>]],<  u64   >,<
          double       >

          The  umask, Kernel and User modes are only printed if the values
          were specified as part of the event.  The 'K' and 'U' fields are
          binary  fields  separated  by  colons,  where the value for each
          binary field may be either '0' or '1'.

          If --timer-interval is specified, a separate line formatted as
              timestamp,<num_seconds_since_epoch>[.n]
          is printed ahead of each dump  of  event  counts.  If  the  time
          interval  specified  is less than one second, the timestamp will
          have 1/10 second precision.

   --output-file / -f outfile_name
          Results are written to outfile_name instead of interactively  to
          the terminal.

   --verbose / -V
          Use this option to increase the verbosity of the output.

   --version / -v
          Show ocount version.

   --help / -h
          Display brief usage message.

   --usage / -u
          Display brief usage message.

EXAMPLE

   $ ocount make

VERSION

   This man page is current for oprofile-1.1.0.

SEE ALSO

   operf(1).


More Linux Commands

manpages/glGetPixelMapuiv.3gl.html
glGetPixelMapuiv(3gl) - return the specified pixel map......
See the glPixelMap reference page for a description of the acceptable values for the map parameter. glGetPixelMap returns in values the contents of the pixel ma

manpages/gnutls_mac_get.3.html
gnutls_mac_get(3) - API function (Library - Linux man page)
Get currently used MAC algorithm. RETURNS the currently used mac algorithm, a gnutls_mac_algorithm_t value. REPORTING BUGS Report bugs to &lt;bug-gnutls@gnu.org&gt;.

manpages/glVertex4f.3gl.html
glVertex4f(3gl) - specify a vertex - Linux manual page......
glVertex commands are used within glBegin/glEnd pairs to specify point, line, and polygon vertices. The current color, normal, and texture coordinates are assoc

manpages/XML::DOM::Document.3pm.html
XML::DOM::Document(3pm) - An XML document node in XML::DOM
XML::DOM::Document extends XML::DOM::Node. It is the main root of the XML document structure as returned by XML::DOM::Parser::parse and XML::DOM::Parser::parsef

manpages/eqn.1.html
eqn(1) - format equations for troff or MathML (Man Page)....
This manual page describes the GNU version of eqn, which is part of the groff document formatting system. eqn compiles descriptions of equations embedded within

manpages/gnutls_x509_crt_set_key.3.html
gnutls_x509_crt_set_key(3) - API function - Linux man page
This function will set the public parameters from the given private key to the certificate. Only RSA keys are currently supported. RETURNS On success, GNUTLS_E_

manpages/tzselect.8.html
tzselect(8) - select a timezone (Admin - Linux man page)....
The tzselect program asks the user for information about the current location, and outputs the resulting timezone description to standard output. The output is

manpages/new_form_sp.3ncurses.html
new_form_sp(3ncurses) - curses screen-pointer extension.....
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th

manpages/libxrx.1.html
libxrx(1) - RX Web Browser Plug-in - Linux manual page......
The RX Plug-in may be used with web browsers in the Mozilla family, including Netscape Navigator (3.0 or later), Firefox, and SeaMonkey, to interpret documents

manpages/overload.3pm.html
overload(3pm) - Package for overloading Perl operations.....
This pragma allows overloading of Perls operators for a class. To overload built-in functions, see Overriding Built-in Functions in perlsub instead. Fundamental

manpages/Ttk_MakeBox.3.html
Ttk_MakeBox(3) - Tk themed geometry utilities (Man Page)....
The Ttk_Box structure represents a rectangular region of a window: typedef struct { int x; int y; int width; int height; } Ttk_Box; All coordinates are relative

manpages/ptar.1.html
ptar(1) - (unknown subject) (Commands - Linux man page).....
ptar is a small, tar look-alike program that uses the perl module Archive::Tar to extract, create and list tar archives. SYNOPSIS ptar -c [-v] [-z] [-C] [-f ARC





We can't live, work or learn in freedom unless the software we use is free.