1 page.title=Dumpsys System Diagnostics 2 @jd:body 3 4 <!-- 5 Copyright 2015 The Android Open Source Project 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 --> 19 <div id="qv-wrapper"> 20 <div id="qv"> 21 <h2>In this document</h2> 22 <ol id="auto-toc"> 23 </ol> 24 </div> 25 </div> 26 27 <p>The <code>dumpsys</code> tool runs on the device and provides information about the status 28 of system services. </p> 29 30 <h2 id=how_to_use_dumpsys>How to use dumpsys</h2> 31 32 <p>If you run <code>adb shell dumpsys</code>, youll get diagnostic output for 33 all system services, which is usually more than you want. For more manageable 34 output, specify the service you would like to examine. </p> 35 36 <p>For example, the following command:</p> 37 38 <pre> 39 $ adb shell dumpsys input 40 </pre> 41 42 <p>provides system data for input components such as touchscreens or built-in 43 keyboards.</p> 44 45 <h2 id=list_of_system_services>List of system services</h2> 46 47 48 <p>For a complete list of system services that you can use with dumpsys, try the 49 following command:</p> 50 51 <pre class="no-pretty-print"> 52 $ adb shell dumpsys -l 53 Currently running services: 54 DockObserver 55 SurfaceFlinger 56 accessibility 57 account 58 activity 59 alarm 60 android.security.keystore 61 appops 62 appwidget 63 assetatlas 64 audio 65 backup 66 battery 67 batteryproperties 68 batterystats 69 bluetooth_manager 70 clipboard 71 connectivity 72 consumer_ir 73 content 74 country_detector 75 cpuinfo 76 dbinfo 77 ... 78 </pre> 79 80 <h2 id=dumpsys_command-line_options>Dumpsys command-line options</h2> 81 82 <p>Command-line options are different for different services. Here are a few 83 common ones:</p> 84 85 <ul> 86 <li> For many services, you can append <code>-h</code> to see the help 87 text. 88 <li> For some services, you can append <code>-c</code> to view the data in 89 a machine-friendly format. </ul> 90 91 <h2 id=understanding_diagnostic_output>Understanding diagnostic output</h2> 92 93 <p>For details on some of the most commonly used dumpsys services, see the 94 following articles:</p> 95 96 <ul> 97 <li> <a 98 href="{@docRoot}devices/input/diagnostics.html">Viewing Input Diagnostics (dumpsys input)</a> 99 <li> <a href="procstats.html">Viewing RAM Usage Data (dumpsys procstats)</a> 100 <li> <a href="netstats.html">Viewing Network Data (dumpsys netstats)</a> 101 <li> <a href="{@docRoot}devices/tech/power/batterystats.html">Viewing Battery Usage Data (dumpsys batterystats)</a> 102 </ul> 103 104