Extracting system and performance information from a mobile device can be an excruciating task. Many tools, both open source and commercial, are available that simplify gathering this data.
Software company Splunk may be the clear market leader when it comes to extracting native information from applications that store data on mobile devices and providing a Google-like front end to search logs and look for patterns. Splunk provides an interface on a server, then customers need a testing and debugging aid to upload mobile application logs to the server. Typically, a programming team provides this feature. A debugging aid can be set up to upload event logs periodically or at a certain time.
Splunk does more than just Google searches; it can also watch a directory or file(s) for instances of certain words. When that word appears in a file, Splunk sends an email. The emailing system reduces the need for searching logs, a practice that can be error-prone. This combination of features creates a powerful scenario: When something bad happens (e.g., a trapped exception), the application captures the user's debug stack and dumps it into a log, which is uploaded to Splunk in five minutes. Splunk catches the error and emails technical support about the problem. Note: This may require a user's permission to "phone home."
System information -- such as memory, processor and battery usage -- as well as specifics about the resources that applications on the phone are using, can be crucial to testing, especially with native applications. Unfortunately, useful diagnostic tools don't come with mobile devices out of the box.
Use System Info or System Status as diagnostic tools when a mobile application has unexpected or slow behavior. These tools work similarly to Task Manager in Windows or Activity Monitor on a Macintosh. Here are a few specific things to look for on mobile devices:
- Hot device: A hot-to-the-touch mobile device is typically using a great deal of processor resources. System info will show exactly how much processor resource your software is using at any given time.
- Battery draining fast: A battery draining very quickly can indicate a meaningful bug in your product -- for example, repeated and constant polling of a website or service that should be requested less often. System information can help pinpoint what is causing this problem (e.g., excess CPU, network stack).
- Application slowdown: Sometimes this is simply that the application is overly complex and "thinking." Sometimes the problem is affecting the device system-wide. System monitoring tools can help pinpoint when the problem began to help determine the cause of the lag.
Remote debugging Web-based mobile applications
A logging strategy
Often, the best long-term strategy for logs and statistics is to create a process to gather the data, push notifications in the case of serious problems, and enable a very simple search. This approach can be helpful for both testing and production support, although, in some cases, it might make more sense to ship a mobile device with the feature disabled and allow troubled customers to enable the feature in settings. The short-term fix is to build tools to quickly gather the information from the device. Either way, hopefully developers have a place to start. Happy hunting!