hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/tools/power/pm-graph/sleepgraph.8
....@@ -53,6 +53,11 @@
5353 Add the dmesg and ftrace logs to the html output. They will be viewable by
5454 clicking buttons in the timeline.
5555 .TP
56
+\fB-noturbostat\fR
57
+By default, if turbostat is found and the requested mode is freeze, sleepgraph
58
+will execute the suspend via turbostat and collect data in the timeline log.
59
+This option disables the use of turbostat.
60
+.TP
5661 \fB-result \fIfile\fR
5762 Export a results table to a text file for parsing.
5863 .TP
....@@ -65,12 +70,14 @@
6570 by 5 seconds to allow runtime suspend changes to occur. The settings are restored
6671 after the test is complete.
6772 .TP
68
-\fB-display \fIon/off\fR
69
-Turn the display on or off for the test using the xset command. This helps
70
-maintain the consistecy of test data for better comparison.
73
+\fB-display \fIon/off/standby/suspend\fR
74
+Switch the display to the requested mode for the test using the xset command.
75
+This helps maintain the consistency of test data for better comparison.
7176 .TP
72
-\fB-skiphtml\fR
73
-Run the test and capture the trace logs, but skip the timeline generation.
77
+\fB-wifi\fR
78
+If a wifi connection is available, check that it reconnects after resume. Include
79
+the reconnect time in the total resume time calculation and treat wifi timeouts
80
+as resume failures.
7481
7582 .SS "advanced"
7683 .TP
....@@ -112,14 +119,34 @@
112119 Include \fIt\fR ms delay after last resume (default: 0 ms).
113120 .TP
114121 \fB-multi \fIn d\fR
115
-Execute \fIn\fR consecutive tests at \fId\fR seconds intervals. The outputs will
116
-be created in a new subdirectory with a summary page: suspend-xN-{date}-{time}.
122
+Used for endurance testing. If \fIn\fR is entirely numeric, it's treated as a count:
123
+Execute \fIn\fR consecutive tests at \fId\fR second intervals.
124
+If \fIn\fR is an integer followed by a "d", "h", or "m", it's treated as a duration:
125
+Execute tests continuously over \fIn\fR days, hours, or minutes at \fId\fR second intervals.
126
+The outputs will be created in a new subdirectory, for count: suspend-{date}-{time}-xN,
127
+for duration: suspend-{date}-{time}-Nm. When the multitest run is done, the \fI-summary\fR
128
+command is called automatically to create summary html files for all the data (unless you
129
+use \fI-skiphtml\fR). \fI-skiphtml\fR will speed up the testing by not creating timelines
130
+or summary html files. You can then run the tool again at a later time with \fI-summary\fR
131
+and \fI-genhtml\fR to create the timelines.
132
+.TP
133
+\fB-maxfail \fIn\fR
134
+Abort a -multi run after \fIn\fR consecutive fails. 0 means never abort (default = 0).
135
+.TP
136
+\fB-skiphtml\fR
137
+Run the test and capture the trace logs, but skip the timeline generation.
138
+You can generate the html timelines later with \fI-dmesg\fR & \fI-ftrace\fR, or
139
+by running \fI-summary\fR and \fI-genhtml\fR.
117140
118141 .SS "ftrace debug"
119142 .TP
120143 \fB-f\fR
121144 Use ftrace to create device callgraphs (default: disabled). This can produce
122145 very large outputs, i.e. 10MB - 100MB.
146
+.TP
147
+\fB-ftop\fR
148
+Use ftrace on the top level call: "suspend_devices_and_enter" only (default: disabled).
149
+This option implies -f and creates a single callgraph covering all of suspend/resume.
123150 .TP
124151 \fB-maxdepth \fIlevel\fR
125152 limit the callgraph trace depth to \fIlevel\fR (default: 0=all). This is
....@@ -138,8 +165,8 @@
138165 The value is a float: e.g. 0.001 represents 1 us.
139166 .TP
140167 \fB-cgfilter \fI"func1,func2,..."\fR
141
-Reduce callgraph output in the timeline by limiting it to a list of calls. The
142
-argument can be a single function name or a comma delimited list.
168
+Reduce callgraph output in the timeline by limiting it certain devices. The
169
+argument can be a single device name or a comma delimited list.
143170 (default: none)
144171 .TP
145172 \fB-cgskip \fIfile\fR
....@@ -164,11 +191,20 @@
164191 .SH COMMANDS
165192 .TP
166193 \fB-summary \fIindir\fR
167
-Create a summary page of all tests in \fIindir\fR. Creates summary.html
168
-in the current folder. The output page is a table of tests with
169
-suspend and resume values sorted by suspend mode, host, and kernel.
170
-Includes test averages by mode and links to the test html files.
171
-Use -genhtml to include tests with missing html.
194
+Create a set of summary pages for all tests in \fIindir\fR recursively.
195
+Creates summary.html, summary-issues.html, and summary-devices.html in the current folder.
196
+summary.html is a table of tests with relevant info sorted by kernel/host/mode,
197
+and links to the test html files. It identifies the minimum, maximum, and median
198
+suspend and resume times for you with highlights and links in the header.
199
+summary-issues.html is a list of kernel issues found in dmesg from all the tests.
200
+summary-devices.html is a list of devices and times from all the tests.
201
+
202
+Use \fI-genhtml\fR to regenerate any tests with missing html.
203
+.TP
204
+\fB-genhtml\fR
205
+Used with \fI-summary\fR to regenerate any missing html timelines from their
206
+dmesg and ftrace logs. This will require a significant amount of time if there
207
+are thousands of tests.
172208 .TP
173209 \fB-modes\fR
174210 List available suspend modes.
....@@ -180,14 +216,24 @@
180216 \fB-fpdt\fR
181217 Print out the contents of the ACPI Firmware Performance Data Table.
182218 .TP
183
-\fB-battery\fR
184
-Print out battery status and current charge.
219
+\fB-wificheck\fR
220
+Print out wifi status and connection details.
221
+.TP
222
+\fB-xon/-xoff/-xstandby/-xsuspend\fR
223
+Test xset by attempting to switch the display to the given mode. This
224
+is the same command which will be issued by \fB-display \fImode\fR.
225
+.TP
226
+\fB-xstat\fR
227
+Get the current DPMS display mode.
185228 .TP
186229 \fB-sysinfo\fR
187230 Print out system info extracted from BIOS. Reads /dev/mem directly instead of going through dmidecode.
188231 .TP
189232 \fB-devinfo\fR
190233 Print out the pm settings of all devices which support runtime suspend.
234
+.TP
235
+\fB-cmdinfo\fR
236
+Print out all the platform data collected from the system that makes it into the logs.
191237 .TP
192238 \fB-flist\fR
193239 Print the list of ftrace functions currently being captured. Functions
....@@ -253,15 +299,21 @@
253299 .IP
254300 \f(CW$ sudo sleepgraph -m mem -rtcwake 15 -x2 -predelay 500 -x2delay 500 -postdelay 500\fR
255301 .PP
256
-Do a batch run of 10 freezes with 30 seconds delay between runs.
257
-.IP
258
-\f(CW$ sudo sleepgraph -m freeze -rtcwake 15 -multi 10 30\fR
259
-.PP
260302 Execute a suspend using a custom command.
261303 .IP
262304 \f(CW$ sudo sleepgraph -cmd "echo mem > /sys/power/state" -rtcwake 15\fR
263305 .PP
264306
307
+.SS "endurance testing using -multi"
308
+.PP
309
+Do a batch run of 10 freezes with 30 seconds delay between runs.
310
+.IP
311
+\f(CW$ sudo sleepgraph -m freeze -rtcwake 15 -multi 10 30\fR
312
+.PP
313
+Do a batch run of freezes for 24 hours.
314
+.IP
315
+\f(CW$ sudo sleepgraph -m freeze -rtcwake 15 -multi 24h 0\fR
316
+
265317 .SS "adding callgraph data"
266318 Add device callgraphs. Limit the trace depth and only show callgraphs 10ms or larger.
267319 .IP