summaryrefslogtreecommitdiffstats
path: root/cmds/dumpstate
Commit message (Collapse)AuthorAgeFilesLines
* am 9d68ed0e: Merge "Add timeout for dump_file."Christopher Ferris2015-02-263-39/+85
|\ | | | | | | | | * commit '9d68ed0ecd3a101c13a163cfe730b13b1564b442': Add timeout for dump_file.
| * Merge "Add timeout for dump_file."Christopher Ferris2015-02-263-39/+85
| |\
| | * Add timeout for dump_file.Christopher Ferris2015-02-253-39/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out dump_file is used on a number of /proc and system files. In one case, the read of a file stalled and caused a bugreport to hang forever. It's still possible if there is a kernel bug that this could stall forever, but less likely. Also, change the return type of nanotime to uint64_t. Testing: - Created a named fifo and verified that dump_file fails with a timeout. - Created a large /data/anr/traces.txt to verify that large files still dump properly and that the additional NONBLOCK parameter doesn't cause a problem. - Created a dummy /data/tombstones/tombstone_00 to verify that the dump of these files still works. - Compared a dump using the old dumpstate to the new dumpstate to verify nothing obviously different. Bug: 19117030 Change-Id: I0d3dd27583c853cdaccd2fd278748cb5f9ccd4fb
* | | am bb67beca: Merge "dumpstate: add pstore read"Mark Salyzyn2015-02-261-0/+4
|\ \ \ | |/ / | | | | | | | | | * commit 'bb67beca35e7d570ede193a316a92022fbc2f810': dumpstate: add pstore read
| * | dumpstate: add pstore readMark Salyzyn2015-02-261-0/+4
| |/ | | | | | | | | | | | | | | Call logcat -L to pull any LAST Android logs. If the kernel is not configured for PSTORE and PSTORE_PMSG, the hopes are the empty content will pressure vendors to slice up and configure support. Change-Id: I5fddfa1e0f59f24fccc30b257ba68af8a8cf8640
* | am 8511b3ae: Merge "Remove -z option."Christopher Ferris2015-02-103-49/+8
|\ \ | |/ | | | | | | * commit '8511b3ae5eb42810f97f7c3e993d7f80d3393b83': Remove -z option.
| * Remove -z option.Christopher Ferris2015-02-093-49/+8
| | | | | | | | | | | | | | | | | | | | | | This option doesn't work with the current selinux protections and doesn't serve much of a purpose. You can get the same results running this: dumpstate | gzip > /data/local/tmp/dump.txt.gz Bug: 19271141 Change-Id: Icc76200df33dc708e30c556ec8a0f393f995fe7c
* | am 50ad67e4: Merge "Add better timeout mechanism for running commands."Christopher Ferris2015-02-041-18/+69
|\ \ | |/ | | | | | | * commit '50ad67e4ce6b07b5f5f4649ace81ed9a8b2c2eac': Add better timeout mechanism for running commands.
| * Add better timeout mechanism for running commands.Christopher Ferris2015-02-031-18/+69
| | | | | | | | Change-Id: I60fc9e7d59c3e0e4b8b2f69f79c6903240bfd131
* | am 0e17a265: Merge "Switch dumpstate to "ip link list"."Elliott Hughes2015-01-281-1/+2
|\ \ | |/ | | | | | | * commit '0e17a265f5e8bf233a3e3b74fc03ada3dc467bed': Switch dumpstate to "ip link list".
| * Switch dumpstate to "ip link list".Elliott Hughes2015-01-281-1/+2
| | | | | | | | Change-Id: Ia1db51c866890f09fbd4316764dea5982554598f
| * Use the timeout stack dump functions.Christopher Ferris2015-01-151-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | Use the native stack dumping functions that allows time outs. If debuggerd locks up, before a bugreport would hang forever. Now it will timeout properly and still get all of the other information. Bug: 18766581 (cherry picked from commit 457731f69e3106b5aae8fc04f9565af1d875876c) Change-Id: I39e8e9c60209e3ef9efac795fedb8e1edce2bd3e
| * Fix message when a command times out.Christopher Ferris2015-01-091-1/+1
| | | | | | | | | | | | The previous version printed out the nanoseconds elapsed, not seconds. Change-Id: I10f6d7bf7b7a4647658313ed83781fda6fd744a5
* | Use the timeout stack dump functions.Christopher Ferris2015-01-141-5/+13
| | | | | | | | | | | | | | | | | | Use the native stack dumping functions that allows time outs. If debuggerd locks up, before a bugreport would hang forever. Now it will timeout properly and still get all of the other information. Bug: 18766581 Change-Id: I85053b8dcfe6224e2b64b4d8f7f2ef448b3cda34
* | Fix message when a command times out.Christopher Ferris2015-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | The previous version printed out the nanoseconds elapsed, not seconds. Bug: 18766581 (cherry picked from commit 67c5a8af9ed128d8bb56d4723303aef6f0a4500f) Change-Id: Icbaaee83a92767694fd98e3c790f36f4d24681b0
* | Work on issue #18486438: Reduce size of bugreport outputDianne Hackborn2014-11-211-3/+0
| | | | | | | | | | | | Don't put packages.xml in to the output. Change-Id: I88a682866365886506a003a64deb4a29c16ba21c
* | dumpstate: report device uptime mmc performanceMark Salyzyn2014-11-041-0/+1
| | | | | | | | | | Bug: 18085992 Change-Id: Ibc0a37d3d2649d1e6708d9357f37ed75f2cea121
* | dumpstate: Add trusty version if driver is foundArve Hjønnevåg2014-10-161-0/+24
|/ | | | Change-Id: I7780ea8e1d777c222a73408f70d8a6d49dee1d92
* Accept socket connection before tracing.Christopher Ferris2014-10-011-3/+7
| | | | | | | | | | Sometimes dumping threads takes a long time and bugreport times out. This change will cause us to accept the bugreport socket connection before dumping threads and should avoid the failed to connect to dumpstate service problems we've seen. Bug: 17758374 Change-Id: I80afa0353cf1c340873f481a8d1d7faffff54120
* Make dumpstate vibrate immediately.Jeff Brown2014-09-112-44/+57
| | | | | | | | | | | | | | | | Previously, the vibration was not performed until after stacks were gathered which takes a long time. Moved the vibration to happen earlier so we provide better user feedback for the three-button salute when collecting a bug report. Deleted some dead code for playing begin/end sounds. Improved the timing measurement code to help track down why bug reports are so slow. (They take over a minute now which can cause us to lose valuable diagnostic information.) Bug: 17474152 Change-Id: Iac73f7993d7dc85196aad96f459b22fd4a710f94
* Use time() instead of clock() for timeouts.Christopher Ferris2014-09-091-4/+4
| | | | | | | | | | The clock() function returns the processor time used by the process. This is not a good timeout mechanism since the code is suspended most of the time waiting for the forked process to finish. Replace with the time() function. Bug: 17154069 Change-Id: Ib383329f9db269445d71a100553b08e71fddda3f
* Fix deadlock when killing adb bugreportAndres Morales2014-08-222-2/+10
| | | | | | | | | Leave default signal handler (terminate) for parent process, add SIG_IGN as signal handler for children and let them go down when the parent gets SIGPIPE. Bug: 17109154 Change-Id: Id33db3e97a32f289eb2a9a1a0ca8acbe3dcd285d
* Improve network connectivity dumping.Lorenzo Colitti2014-07-311-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Explicitly dump IP addresses. Currently, some IP addresses are dumped using netcfg, but that only dumps the first IPv4 address on each interface. Instead, call ip -4 addr and ip -6 addr explicitly to dump all IPv4 and IPv6 addresses on the system. 2. Disable dumping /proc/net/{ipv6,}route, because: - We already dump all IPv4 and IPv6 routes in the tables that we use. - /proc/net/route is confusing because it only includes routes in the main table, which are all but unused. It's also in unreadable host-byte-order hex. - /proc/net/ipv6_route is confusing because it includes routes from all tables but does not say what table they are in. 3. Instead of dumping the contents of /proc/net/arp , use "ip -4 neigh show" and "ip -6 neigh show" to dump the neighbour caches for both IPv4 and IPv6. Bug: 16663736 Change-Id: Id3e509b877ab7b00eb2399b6a9868b12245da2f0
* Add dumping of tombstones to dumpstate.Christopher Ferris2014-07-233-11/+65
| | | | | | Dump only those tombstones modified within the last half an hour. Change-Id: I8ce836b2e19eba7a9c0c31a4f312f9a382526da7
* Always #include <sys/...>, not <linux/...>.Elliott Hughes2014-07-181-1/+1
| | | | | | (cherry picked from commit 1e4ee9afd2de12af98dbf476b73e2d43f605384c) Change-Id: Ie005774484f98bb33c8f867cddb778ac04a1d4ea
* dumpstate: fix dumping traces for vm processes on 64-bitColin Cross2014-07-171-2/+2
| | | | | | | | | | | | dumpstate was not dumping any stack traces for vm processes because it was failing the string compare for /system/bin/app_process. 64-bit devices use app_process32 and app_process64 instead of app_process, and zygote64 alongside zygote. Change the string matching to be prefix matching. (cherry picked from commit 8eb25d552b07ffa799b7b61ad46d0109e7512741) Change-Id: I6b1568161fae278f0e6107990e5b750cf0ca902b
* dump bluedroid kernel status do not mergeMatthew Xie2014-07-141-0/+1
| | | | | Change-Id: I4617f770088f86ceda2caf58bd1fdae81b3e31df (cherry picked from commit ed3b9a09771a79b62fd4a5943d3845e7ceee6a34)
* resolved conflicts for merge of 928e05b1 to masterSreeram Ramachandran2014-07-093-4/+25
|\ | | | | | | Change-Id: I1d1e623a1f95baa4375a87242ce71ea789884649
| * am 0d2bee0c: Merge "Dump all the correct routing tables."Sreeram Ramachandran2014-07-093-4/+25
| |\ | | | | | | | | | | | | * commit '0d2bee0c0baec56ec98867d7e044602097525248': Dump all the correct routing tables.
| | * Dump all the correct routing tables.Sreeram Ramachandran2014-07-083-4/+25
| | | | | | | | | | | | | | | | | | The list of tables is maintained in /data/misc/net/rt_tables by netd. Change-Id: I55475c08c5e43bcf61af916210e680c47480ac32
* | | am 45fcfb48: am 85453ecc: dumpstate: increase poll timeout waiting for ↵Nick Vaccaro2014-04-301-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | SIGQUIT logging * commit '45fcfb48ef9e65747e7a3f35e1a4da232f6e161a': dumpstate: increase poll timeout waiting for SIGQUIT logging
| * | am 85453ecc: dumpstate: increase poll timeout waiting for SIGQUIT loggingNick Vaccaro2014-04-301-1/+1
| |\ \ | | | | | | | | | | | | | | | | * commit '85453ecc90a94564e586f0f97c9ec2c0cf831501': dumpstate: increase poll timeout waiting for SIGQUIT logging
| | * | dumpstate: increase poll timeout waiting for SIGQUIT loggingNick Vaccaro2014-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Increased the maximum time dumpstate will wait for SIGQUIT process to finish dumping its thread stacks to the logfile to 5 seconds. Bug: 14057177 Change-Id: I0b43004512855d202f2fe0ea7b0e934e77a3a070
* | | | am 0e4d2885: am 2044ac43: Merge "Convert all selinux_android_restorecon and ↵Nick Kralevich2014-02-131-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | _setfilecon calls to new API." * commit '0e4d2885a34d31f5dbe5a08bdb654953abaf82a2': Convert all selinux_android_restorecon and _setfilecon calls to new API.
| * | | am 2044ac43: Merge "Convert all selinux_android_restorecon and _setfilecon ↵Nick Kralevich2014-02-121-1/+1
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | | | | calls to new API." * commit '2044ac43e53b517526b3c70dc4fbc60ffc01693f': Convert all selinux_android_restorecon and _setfilecon calls to new API.
| | * Convert all selinux_android_restorecon and _setfilecon calls to new API.Stephen Smalley2014-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libselinux selinux_android_restorecon API is changing to the more general interface with flags and dropping the older variants. Also get rid of the old, no longer used selinux_android_setfilecon API and rename selinux_android_setfilecon2 to it as it is the only API in use. Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* | | Dump system settings for all usersJohn Spurlock2014-01-293-3/+47
|/ / | | | | | | Change-Id: Ic832b19fe698da1984876b2949c3f26990ae5076
* | dumpstate: dump console-ramoops instead of last_kmsg if presentTodd Poynor2013-12-101-3/+11
|/ | | | Change-Id: I41a922b33f0b6b4e8e150a92e46032501a165e33
* Fix issue #10422349: Limit/change the battery history data in batterystatsDianne Hackborn2013-09-041-1/+1
| | | | | | Use new compact option to include history when dumping battery stats. Change-Id: I3833a88db76d8791bd5c2e8f6ff414af65472a42
* dumpstate: Fix wifi list of networks dumpDmitry Shmidt2013-08-211-1/+1
| | | | | | | Bug: 9056601 Change-Id: Ia0adb67afdf3d478033d0ee34bbb95e621e2fe51 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* dumpstate: switch to HAL static librariesTodd Poynor2013-08-133-8/+28
| | | | Change-Id: I865a0b4b4a84a2d54a239e7b09874287f0c1ad56
* dumpstate: remove libutils dependencyAlex Ray2013-07-231-1/+1
| | | | Change-Id: I9745f389402c01b90877612e060ac996eba99964
* dumpstate: Show SELinux process labelsNick Kralevich2013-07-151-0/+1
| | | | Change-Id: Ie19586a3b733bd4420f6b20b5d253d42c2f165ea
* Fix cmd line arguments for usagestats.Dianne Hackborn2013-07-121-1/+1
| | | | Change-Id: I9a1436aa1d1665924ba62a568bb4b66d67ae2814
* Update to follow procstats options changes.Dianne Hackborn2013-07-091-2/+1
| | | | Change-Id: I6f016c944cfcd01bbbcf3cf37bc7ff05482f0012
* Update to use --include-committed for procstats.Dianne Hackborn2013-07-031-1/+3
| | | | Change-Id: I5ce737b624c5617c94054d6bedebca754fbf16a9
* Add checkin dumps to bug reports.Dianne Hackborn2013-06-261-0/+9
| | | | | | | This is a duplicate of the associated human-readable dumps of these services, but much better for automated parsing. Change-Id: I902b768b03aeac1472f03f96913f9b8ada5dba9c
* am 74bd799e: Merge "Exit dumpstate on SIGPIPE to avoid cascading child crashes"jp abgrall2013-05-281-1/+9
|\ | | | | | | | | * commit '74bd799ec20d2420459fa382533b1cc39ca9a54c': Exit dumpstate on SIGPIPE to avoid cascading child crashes
| * Exit dumpstate on SIGPIPE to avoid cascading child crashesJohn Michelau2013-05-281-1/+9
| | | | | | | | | | | | | | | | When dumpstate ignores SIGPIPE it can lead to a cascade of tombstones / coredumps since many of its children don't handle or ignore it. It's best to just exit dumpstate once the pipe is broken. Change-Id: Ic0c57ecf4171f0c0a07837e51c41cb1876e1350c
* | resolved conflicts for merge of c76e8a20 to jb-mr2-dev-plus-aospYing Wang2013-04-091-1/+1
|\ \ | | | | | | | | | Change-Id: I895a8ad8c936a80c70aaac739c6441d3c7c55834