File: eventstat.8

package info (click to toggle)
eventstat 0.06.00-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 160 kB
  • sloc: ansic: 1,534; makefile: 39
file content (147 lines) | stat: -rw-r--r-- 4,693 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
.\"                                      Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH EVENTSTAT 8 "January 12, 2024"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n>    insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
eventstat \- a tool to measure system events.
.br

.SH SYNOPSIS
.B eventstat
.RI [options] " [delay " [count]]
.br

.SH DESCRIPTION
eventstat is a program that dumps the current active system events that are
added to the kernel timer list.

.SH OPTIONS
eventstat options are as follow:
.TP
.B \-b
just report events, PID and process name. By default the short task name from
the kernel comm field will be displayed, however the \-s and \-l options 
will report more process name information.
.TP
.B \-c
report cumulative events rather than events per sample period.
.TP
.B \-C
report the sample event count in the CSV output rather than the default
events per second rate.
.TP
.B \-d
strip full directory path off the process name in the CSV output.
.TP
.B \-h
show help.
.TP
.B \-i
show timer ID information.
.TP
.B \-k
report just kernel threads.
.TP
.B \-l
report long process name from /proc/pid/cmdline. This reports
the process name and all the command line arguments.
.TP
.B \-n event_count
only display the first event_count number of top events.
.TP
.B \-q 
run quietly, only really makes sense with \-r option.
.TP
.B \-r csv_file
output gathered data in a comma separated values file. This
can be then imported and graphed using your favourite open
source spread sheet.
.TP
.B \-s
report short process name from /proc/pid/cmdline. This reports
just the process name.
.TP
.B \-S
report the minimum, maximum, average and population standard deviation
at the end of the CSV output.
.TP
.B \-t threshold
ignore samples where the event delta per second less than the given threshold.
.TP
.B \-T
enable 'top' mode, refresh display on each update.
.TP
.B \-u
report just user space processes.
.TP
.B \-w
add timestamp (the "whence" info) to the output.
.SH EXAMPLES
.LP
Dump events every second until stopped.
.RS 8
sudo eventstat
.RE
.LP
Dump the top 20 events every 60 seconds until stopped.
.RS 8
sudo eventstat \-n 20 60
.RE
.LP
Dump events every 10 seconds just 5 times.
.RS 8
sudo eventstat 10 5
.RE
.LP
Quietly dump events every 10 seconds just 5 times into a CSV file with short process name.
.RS 8
sudo eventstat 10 5 \-q \-s \-r results.csv
.RE
.SH CSV OUTPUT
.LP
The \-r option generates a comma separated file report that can be imported into
spreadsheets or parsed using text processing tools.  Column 1 of the data is the
label for each row, columns 2 onwards contain the data for each task that generated
a wakeup event.
.LP
The first row lists the task name of the thread or process. Task names in [ ] brackets are
kernel threads, other tasks are the names of user space processes.  By default these
names are derived from the task names from kernel trace events but the \-s \-l options
fetch more complete task names from /proc/pid/cmdline instead.
.LP
The second and third rows list the names of the internal Linux kernel timer init function.
.LP
The fourth row lists the total number of wakeup events for each task during the entire run of eventstat.
.LP
The subsequent rows list the average number of wakeups per second measured during the sample interval for each 
task in column two onwards. The first column indicates the sample time (in seconds) since the start of the measuring.
.SH NOTES
Version 4.0 of eventstat gathers event timer data from the kernel trace event timers and hence is
not compatible with previous versions of eventstat. The move to using kernel trace events was
necessary as the Linux 4.12 kernel dropped support for the /proc/timer_stats interface.
.SH SEE ALSO
.BR powertop (8),
.BR top (1)
.SH AUTHOR
eventstat was written by Colin King <colin.king@canonical.com>
.PP
This manual page was written by Colin King <colin.i.king@gmail.com>,
for the Ubuntu project (but may be used by others).
.SH COPYRIGHT
Copyright \(co 2011-2021 Canonical Ltd, Copyright \(co 2021-2024 Colin Ian King.
.br
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.