| page.title=Dumpsys System Diagnostics | |
| @jd:body | |
| <!-- | |
| Copyright 2015 The Android Open Source Project | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an "AS IS" BASIS, | |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| See the License for the specific language governing permissions and | |
| limitations under the License. | |
| --> | |
| <div id="qv-wrapper"> | |
| <div id="qv"> | |
| <h2>In this document</h2> | |
| <ol id="auto-toc"> | |
| </ol> | |
| </div> | |
| </div> | |
| <p>The <code>dumpsys</code> tool runs on the device and provides information about the status | |
| of system services. </p> | |
| <h2 id=how_to_use_dumpsys>How to use dumpsys</h2> | |
| <p>If you run <code>adb shell dumpsys</code>, you’ll get diagnostic output for | |
| all system services, which is usually more than you want. For more manageable | |
| output, specify the service you would like to examine. </p> | |
| <p>For example, the following command:</p> | |
| <pre> | |
| $ adb shell dumpsys input | |
| </pre> | |
| <p>provides system data for input components such as touchscreens or built-in | |
| keyboards.</p> | |
| <h2 id=list_of_system_services>List of system services</h2> | |
| <p>For a complete list of system services that you can use with dumpsys, try the | |
| following command:</p> | |
| <pre class="no-pretty-print"> | |
| $ adb shell dumpsys -l | |
| Currently running services: | |
| DockObserver | |
| SurfaceFlinger | |
| accessibility | |
| account | |
| activity | |
| alarm | |
| android.security.keystore | |
| appops | |
| appwidget | |
| assetatlas | |
| audio | |
| backup | |
| battery | |
| batteryproperties | |
| batterystats | |
| bluetooth_manager | |
| clipboard | |
| commontime_management | |
| connectivity | |
| consumer_ir | |
| content | |
| country_detector | |
| cpuinfo | |
| dbinfo | |
| ... | |
| </pre> | |
| <h2 id=dumpsys_command-line_options>Dumpsys command-line options</h2> | |
| <p>Command-line options are different for different services. Here are a few | |
| common ones:</p> | |
| <ul> | |
| <li> For many services, you can append <code>-h</code> to see the help | |
| text. | |
| <li> For some services, you can append <code>-c</code> to view the data in | |
| a machine-friendly format. </ul> | |
| <h2 id=understanding_diagnostic_output>Understanding diagnostic output</h2> | |
| <p>For details on some of the most commonly used dumpsys services, see the | |
| following articles:</p> | |
| <ul> | |
| <li> <a | |
| href="{@docRoot}devices/input/diagnostics.html">Viewing Input Diagnostics (dumpsys input)</a> | |
| <li> <a href="{@docRoot}devices/tech/ram/procstats.html">Viewing RAM Usage Data (dumpsys procstats)</a> | |
| <li> <a href="{@docRoot}devices/tech/netstats.html">Viewing Network Data (dumpsys netstats)</a> | |
| <li> <a href="{@docRoot}devices/tech/power/batterystats.html">Viewing Battery Usage Data (dumpsys batterystats)</a> | |
| </ul> | |