|
1 |
| - p m - g r a p h |
| 1 | + _ |
| 2 | + _ __ _ __ ___ __ _ _ __ __ _ _ __ | |__ |
| 3 | + | '_ \| '_ ` _ \ _____ / _` | '__/ _` | '_ \| '_ \ |
| 4 | + | |_) | | | | | |_____| (_| | | | (_| | |_) | | | | |
| 5 | + | .__/|_| |_| |_| \__, |_| \__,_| .__/|_| |_| |
| 6 | + |_| |___/ |_| |
2 | 7 |
|
3 | 8 | pm-graph: suspend/resume/boot timing analysis tools
|
4 |
| - Version: 5.5 |
| 9 | + Version: 5.6 |
5 | 10 | Author: Todd Brandt < [email protected]>
|
6 | 11 | Home Page: https://01.org/pm-graph
|
7 | 12 |
|
|
18 | 23 | - upstream version in git:
|
19 | 24 | https://github.com/intel/pm-graph/
|
20 | 25 |
|
21 |
| - Requirements: |
22 |
| - - runs with python2 or python3, choice is made by /usr/bin/python link |
23 |
| - - python2 now requires python-configparser be installed |
24 |
| - |
25 | 26 | Table of Contents
|
26 | 27 | - Overview
|
27 | 28 | - Setup
|
28 | 29 | - Usage
|
29 | 30 | - Basic Usage
|
30 | 31 | - Dev Mode Usage
|
31 | 32 | - Proc Mode Usage
|
| 33 | + - Endurance Testing |
| 34 | + - Usage Examples |
32 | 35 | - Configuration Files
|
33 | 36 | - Usage Examples
|
34 | 37 | - Config File Options
|
|
54 | 57 | | SETUP |
|
55 | 58 | ------------------------------------------------------------------
|
56 | 59 |
|
57 |
| - These packages are required to execute the scripts |
| 60 | + Package Requirements |
| 61 | + - runs with python2 or python3, choice is made by /usr/bin/python link |
58 | 62 | - python
|
59 |
| - - python-requests |
| 63 | + - python-configparser (for python2 sleepgraph) |
| 64 | + - python-requests (for googlesheet.py) |
| 65 | + - linux-tools-common (for turbostat usage in sleepgraph) |
60 | 66 |
|
61 | 67 | Ubuntu:
|
62 |
| - sudo apt-get install python python-requests |
| 68 | + sudo apt-get install python python-configparser python-requests linux-tools-common |
63 | 69 |
|
64 | 70 | Fedora:
|
65 |
| - sudo dnf install python python-requests |
| 71 | + sudo dnf install python python-configparser python-requests linux-tools-common |
66 | 72 |
|
67 | 73 | The tools can most easily be installed via git clone and make install
|
68 | 74 |
|
@@ -190,6 +196,104 @@ _______________
|
190 | 196 |
|
191 | 197 | %> sudo ./sleepgraph.py -config config/suspend-proc.cfg
|
192 | 198 |
|
| 199 | +------------------------------------------------------------------ |
| 200 | +| ENDURANCE TESTING | |
| 201 | +------------------------------------------------------------------ |
| 202 | + |
| 203 | + The best way to gauge the health of a system is to run a series of |
| 204 | + suspend/resumes over an extended period and analyze the behavior. This can be |
| 205 | + accomplished with sleepgraph's -multi argument. You specify two numbers: the |
| 206 | + number of tests to run OR the duration in days, hours, or minutes, and the |
| 207 | + delay in seconds between them. For instance, -multi 20 5: execute 20 tests with |
| 208 | + a 5 second delay between each, or -multi 24h 0: execute tests over a 24 hour |
| 209 | + period with no delay between tests. You can include any other options you like |
| 210 | + to generate the data you want. It's most useful to collect dev mode timelines |
| 211 | + as the kprobes don't alter the performance much and you get more insight. |
| 212 | + |
| 213 | + On completion, the output folder contains a series of folders for the |
| 214 | + individual test data and a set of summary pages in the root. The summary.html |
| 215 | + file is a tabular list of the tests with relevant info and links. The |
| 216 | + summary-issue.html and summary-devices.html files include data taken from |
| 217 | + all tests on kernel issues and device performance. The folder looks like this: |
| 218 | + |
| 219 | + suspend-xN-{date}-{time}: |
| 220 | + summary.html |
| 221 | + summary-issues.html |
| 222 | + summary-devices.html |
| 223 | + suspend-{date}-{time} (1) |
| 224 | + suspend-{date}-{time} (2) |
| 225 | + ... |
| 226 | + |
| 227 | + These are the relevant arguments to use for testing: |
| 228 | + |
| 229 | + -m mode |
| 230 | + Mode to initiate for suspend e.g. mem, freeze, standby (default: mem). |
| 231 | + |
| 232 | + -rtcwake t |
| 233 | + Use rtcwake to autoresume after t seconds (default: 15). |
| 234 | + |
| 235 | + -gzip (optional) |
| 236 | + Gzip the trace and dmesg logs to save space. The tool can also read in |
| 237 | + gzipped logs for processing. This reduces the multitest folder size. |
| 238 | + |
| 239 | + -dev (optional) |
| 240 | + Add kernel source calls and threads to the timeline (default: disabled). |
| 241 | + |
| 242 | + -multi n d |
| 243 | + Execute n consecutive tests at d seconds intervals. The outputs will be |
| 244 | + created in a new subdirectory: suspend-xN-{date}-{time}. When the multitest |
| 245 | + run is done, the -summary command is called automatically to create summary |
| 246 | + html files for all the data (unless you use -skiphtml). -skiphtml will |
| 247 | + speed up the testing by not creating timelines or summary html files. You |
| 248 | + can then run the tool again at a later time with -summary and -genhtml to |
| 249 | + create the timelines. |
| 250 | + |
| 251 | + -skiphtml (optional) |
| 252 | + Run the test and capture the trace logs, but skip the timeline and summary |
| 253 | + html generation. This can greatly speed up overall testing. You can then |
| 254 | + copy the data to a faster host machine and run -summary -genhtml to |
| 255 | + generate the timelines and summary. |
| 256 | + |
| 257 | + These are the relevant commands to use after testing is complete: |
| 258 | + |
| 259 | + -summary indir |
| 260 | + Generate or regenerate the summary for a -multi test run. Creates three |
| 261 | + files: summary.html, summary-issues.html, and summary-devices.html in the |
| 262 | + current folder. summary.html is a table of tests with relevant info sorted |
| 263 | + by kernel/host/mode, and links to the test html files. summary-issues.html |
| 264 | + is a list of kernel issues found in dmesg from all the tests. |
| 265 | + summary-devices.html is a list of devices and times from all the tests. |
| 266 | + |
| 267 | + -genhtml |
| 268 | + Used with -summary to regenerate any missing html timelines from their |
| 269 | + dmesg and ftrace logs. This will require a significant amount of time if |
| 270 | + there are thousands of tests. |
| 271 | + |
| 272 | +Usage Examples |
| 273 | +_______________ |
| 274 | + |
| 275 | + A multitest is initiated like this: |
| 276 | + |
| 277 | + %> sudo ./sleepgraph.py -m mem -rtcwake 10 -dev -gzip -multi 2000 0 |
| 278 | + |
| 279 | + or you can skip timeline generation in order to speed things up |
| 280 | + |
| 281 | + %> sudo ./sleepgraph.py -m mem -rtcwake 10 -dev -gzip -multi 2000 0 -skiphtml |
| 282 | + |
| 283 | + The tool will produce an output folder with all the test subfolders inside. |
| 284 | + Each test subfolder contains the dmesg/ftrace logs and/or the html timeline |
| 285 | + depending on whether you used the -skiphtml option. The root folder contains |
| 286 | + the summary.html files. |
| 287 | + |
| 288 | + The summary for an existing multitest is generated like this: |
| 289 | + |
| 290 | + %> cd suspend-x2000-{date}-{time} |
| 291 | + %> sleepgraph.py -summary . |
| 292 | + |
| 293 | + or if you need to generate the html timelines you can use -genhtml |
| 294 | + |
| 295 | + %> cd suspend-xN-{date}-{time} |
| 296 | + %> sleepgraph.py -summary . -genhtml |
193 | 297 |
|
194 | 298 | ------------------------------------------------------------------
|
195 | 299 | | CONFIGURATION FILES |
|
|
0 commit comments