1ocount(1)                   General Commands Manual                  ocount(1)
2
3
4

NAME

6       ocount - Event counting tool for Linux
7
8

SYNOPSIS

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

DESCRIPTION

15       ocount is an OProfile tool that can be used to  count  native  hardware
16       events  occurring  in either a given application, a set of processes or
17       threads, a subset of active system processors, or  the  entire  system.
18       The  data collected during a counting session is displayed to stdout by
19       default or, optionally, to a file.
20
21       When counting multiple events, the kernel may not be able to count  all
22       events  simultaneously and, thus, may need to multiplex the counting of
23       the events.  If this happens, the "Percent time enabled" column in  the
24       ocount output will be less than 100, but counts are scaled up to a 100%
25       estimated value.
26
27

RUN MODES

29       One (and only one) of the following run modes must  be  specified.   If
30       you run ocount using a run mode other than command [args] , press Ctrl-
31       c to stop ocount when  finished  counting  (e.g.,  when  the  monitored
32       process  ends).   If you background ocount (i.e., with '&') while using
33       one these run modes, you must stop it in a controlled  manner  so  that
34       the  data collection process can be shut down cleanly and final results
35       can be displayed. Use kill -SIGINT <ocount-PID> for this purpose.
36
37       command [args]
38              The command is the application for which to count events.   args
39              are  the  input arguments required by the application.  The com‐
40              mand and its arguments must be positioned at the end of the com‐
41              mand line, after all ocount options.
42
43       --process-list / -p pids
44              Use  this option to count events for one or more already-running
45              applications, specified via a comma-separated  list  (  pids  ).
46              Event  counts  will  be collected for all children of the passed
47              process(es) as well.
48
49
50       --thread-list / -r tids
51              Use this option to count events for one or more  already-running
52              threads,  specified  via  a comma-separated list ( tids ). Event
53              counts will not be collected for  any  children  of  the  passed
54              thread(s).
55
56
57       --system-wide / -s
58              This  option is for counting events for all processes running on
59              your system.  You must have root authority to run ocount in this
60              mode.
61
62
63       --cpu-list / -C cpus
64              This  option is for counting events on a subset of processors on
65              your system. You must have root authority to run ocount in  this
66              mode.  This is a comma-separated list, where each element in the
67              list may be either a single processor number or a range of  pro‐
68              cessor numbers; for example: '-C 2,3,4-11,15'.
69
70

OTHER OPTIONS

72       --events / -e event1[,event2[,...]]
73              This option is for passing a comma-separated list of event spec‐
74              ifications for counting. Each event spec is of the form:
75                 name[:unitmask[:kernel[:user]]]
76              Note: Do not include a count value in the event  spec,  as  that
77              parameter is only need when profiling.
78
79              You  can specify unit mask values using either a numerical value
80              (hex values must begin with "0x") or a  symbolic  name  (if  the
81              name=<um_name>  field  is  shown in the ophelp output). For some
82              named unit masks, the hex value is not  unique;  thus,  OProfile
83              tools  enforce  specifying such unit masks value by name.  If no
84              unit mask is specified, the default  unit  mask  value  for  the
85              event is used.
86
87              Event  names  for certain processor types include a _GRP<n> suf‐
88              fix.  For such cases, the --events option may be specified  with
89              or without the _GRP<n> suffix.
90
91              When  no event specification is given, the default event for the
92              running processor type will be used for counting.  Use ophelp to
93              list the available events for your processor type.
94
95
96       --separate-thread / -t
97              This   option  can  be  used  in  conjunction  with  either  the
98              --process-list or --thread-list option to display  event  counts
99              on  a  per-thread (per-process) basis.  Without this option, all
100              counts are aggregated.
101
102              NOTE: If new threads are started by the process(es) being  moni‐
103              tored  after  counting  begins, the counts for those threads are
104              aggregated with their parent's counts.
105
106
107       --separate-cpu / -c
108              This option can be used in conjunction with either the --system-
109              wide  or  --cpu-list option to display event counts on a per-cpu
110              basis.  Without this option, all counts are aggregated.
111
112
113       --time-interval / -i num_seconds[:num_intervals]
114              Results collected for  each  time  interval  are  printed  every
115              num_seconds  instead  of  the  default of one dump of cumulative
116              event counts at the end of the run.  If num_intervals is  speci‐
117              fied,  ocount  exits  after  the  specified  number of intervals
118              occur.
119
120
121       --brief-format / -b
122              Use this option to print results in the following brief format:
123                  [optional    cpu    or    thread,]<event_name>,<count>,<per‐
124              cent_time_enabled>
125                  [         <int>          ,]<  string  >,< u64 >,<     double
126              >
127
128              If --timer-interval is specified, a separate line formatted as
129                  timestamp,<num_seconds_since_epoch>
130              is printed ahead of each dump of event counts.
131
132
133       --output-file / -f outfile_name
134              Results are written to outfile_name instead of interactively  to
135              the terminal.
136
137       --verbose / -V
138              Use this option to increase the verbosity of the output.
139
140       --version / -v
141              Show ocount version.
142
143       --help / -h
144              Display brief usage message.
145
146       --usage / -u
147              Display brief usage message.
148
149

EXAMPLE

151       $ ocount make
152
153

VERSION

155       This man page is current for oprofile-0.9.9.
156
157

SEE ALSO

159       operf(1).
160
161
162
163oprofile 0.9.9               Fri 02 November 2018                    ocount(1)
Impressum