Monitoring Android Apps using the logcat and iperf tools. 22 May 2015



Similar documents
Network testing with iperf

Iperf Tutorial. Jon Dugan Summer JointTechs 2010, Columbus, OH

EXPLORER. TFT Filter CONFIGURATION

Homework 3 TCP/IP Network Monitoring and Management

WiFiPerf User Guide 1.5

TCP Labs. WACREN Network Monitoring and Measurement Workshop Antoine Delvaux perfsonar developer

Measure wireless network performance using testing tool iperf

About Firewall Protection

Measuring Wireless Network Performance: Data Rates vs. Signal Strength

Troubleshooting Tools

itvsense Probe M-301/M-304

Frequently Asked Questions

Network Monitoring. Sebastian Büttrich, NSRC / IT University of Copenhagen Last edit: February 2012, ICTP Trieste

Hands On Activities: TCP/IP Network Monitoring and Management

IxChariot Pro Active Network Assessment and Monitoring Platform

Emerald. Network Collector Version 4.0. Emerald Management Suite IEA Software, Inc.

The Problem with TCP. Overcoming TCP s Drawbacks

Improving Quality of Service

Top 10 Tips for z/os Network Performance Monitoring with OMEGAMON Session 11899

1000Mbps Ethernet Performance Test Report

Using IPM to Measure Network Performance

Testing & Assuring Mobile End User Experience Before Production. Neotys

Configuring PA Firewalls for a Layer 3 Deployment

Test Methodology White Paper. Author: SamKnows Limited

H3C Firewall and UTM Devices DNS and NAT Configuration Examples (Comware V5)

How To Test The Bandwidth Meter For Hyperv On Windows V (Windows) On A Hyperv Server (Windows V2) On An Uniden V2 (Amd64) Or V2A (Windows 2

Lab VI Capturing and monitoring the network traffic

Configuring and Monitoring the Client Desktop Component

+ iptables. packet filtering && firewall

Firewall Defaults, Public Server Rule, and Secondary WAN IP Address

LARGE-SCALE INTERNET MEASUREMENTS FOR DIAGNOSTICS AND PUBLIC POLICY. Henning Schulzrinne (+ Walter Johnston & James Miller) FCC & Columbia University

Common VoIP problems, How to detect, correct and avoid them. Penny Tone LLC 1

NMS300 Network Management System

Understanding Slow Start

Chapter 4 Managing Your Network

Avaya ExpertNet Lite Assessment Tool

This Technical Support Note shows the different options available in the Firewall menu of the ADTRAN OS Web GUI.

Network Management and Debugging. Jing Zhou

Linux MDS Firewall Supplement

Follow these steps to prepare the module and evaluation board for testing.

Lab 6: Wireless Networks

Layer Four Traceroute (and related tools) A modern, flexible path-discovery solution with advanced features for network (reverse) engineers

Policy Based Forwarding

Firewall Defaults and Some Basic Rules

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

NQA Technology White Paper

Quantifying the Performance Degradation of IPv6 for TCP in Windows and Linux Networking

VLAN for DekTec Network Adapters

Smartphone Pentest Framework v0.1. User Guide

OCS Training Workshop LAB14. Setup

Websense Web Security Gateway: What to do when a Web site does not load as expected

PIX/ASA 7.x with Syslog Configuration Example

SLA para aplicaciones en redes WAN. Alvaro Cayo Urrutia

Guideline for setting up a functional VPN

Visualizations and Correlations in Troubleshooting

Skywire TCP Socket Examples

Parallels Plesk Panel

Provisioning and configuring the SIP Spider

TFTP TRIVIAL FILE TRANSFER PROTOCOL OVERVIEW OF TFTP, A VERY SIMPLE FILE TRANSFER PROTOCOL FOR SIMPLE AND CONSTRAINED DEVICES

HP A5820X & A5800 Switch Series Network Management and Monitoring. Configuration Guide. Abstract

Integrated Traffic Monitoring

Technical Support Information Belkin internal use only

Configuring Health Monitoring Using Health Probes

Integration with CA Transaction Impact Monitor

Introduction to Network Security Lab 1 - Wireshark

Network performance in virtual infrastructures

Subnetting,Supernetting, VLSM & CIDR

Using IPSec in Windows 2000 and XP, Part 2

ITL Lab 5 - Performance Measurements and SNMP Monitoring 1. Purpose

MULTI WAN TECHNICAL OVERVIEW

D. SamKnows Methodology 20 Each deployed Whitebox performs the following tests: Primary measure(s)

DATA COMMUNICATIONS MANAGEMENT. Gilbert Held INSIDE

BIT COMMANDER. Serial RS232 / RS485 to Ethernet Converter

Monitoring and analyzing audio, video, and multimedia traffic on the network

IP SLAs Overview. Finding Feature Information. Information About IP SLAs. IP SLAs Technology Overview

z/os V1R11 Communications Server system management and monitoring

DLink-655 Router Configuration Guide for VoIP

1:1 NAT in ZeroShell. Requirements. Overview. Network Setup

Network Interface Failover using FONA

IOSMap: TCP and UDP Port Scanning on Cisco IOS Platforms

ETM System SIP Trunk Support Technical Discussion

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

MFPConnect Monitoring. Monitoring with IPCheck Server Monitor. Integration Manual Version Edition 1

Quick Note 53. Ethernet to W-WAN failover with logical Ethernet interface.

12 Quality of Service (QoS)

FortiOS Handbook - Load Balancing VERSION 5.2.2

Lab 5.5 Configuring Logging

Application Latency Monitoring using nprobe

PANDORA FMS NETWORK DEVICES MONITORING

Internet Technology Voice over IP

Lecture 2-ter. 2. A communication example Managing a HTTP v1.0 connection. G.Bianchi, G.Neglia, V.Mancuso

Control of Multiple Packet Schedulers for Improving QoS on OpenFlow/SDN Networking

Lab Configure Intrusion Prevention on the PIX Security Appliance

Firewall Load Balancing

IP - The Internet Protocol

Transcription:

Monitoring Android Apps using the logcat and iperf tools Michalis Katsarakis katsarakis@csd.uoc.gr Tutorial: HY-439 22 May 2015 http://www.csd.uoc.gr/~hy439/

Outline Introduction Monitoring the Android App usage Open source applications Closed source applications Monitoring the network QoS Passive measurements Active measurements Ping Iperf NDT

Introduction Application QoE vs. Network QoS The Quality of Experience (QoE) of an Android application can be influenced by network Quality of Service (QoS). How can we assess this in influence? We need to monitor: Events of application usage (e.g. clicks on specific buttons, progress in the usage scenarios) User experience Network performance

Outline Introduction Monitoring the Android App usage Open source applications Closed source applications Monitoring the network QoS Passive measurements Active measurements Ping Iperf NDT

Monitoring the Android app usage How do we monitor the App usage? Case 1: We have access to the App source code (e.g., App is open-source or developed by us) Case 2: We have no access to the source code (e.g., closed-source commercial application)

Monitoring the Android app usage Case 1: We have access to the App source code We can add code snippets on specific locations of the App source code. Write events in a text file Write events in a database Broadcast Intents or use a ContentProvider to send events on a monitor App.

Monitoring the Android app usage Case 2: We have no access to the source code Use logcat to read the logs of the App. The Android logging system provides a mechanism for collecting and viewing system debug output. Logs from various applications and portions of the system are collected in a series of circular buffers, which then can be viewed and filtered by the logcat command. [adb] logcat [<option>]... [<filter-spec>]... Android Apps can execute a logcat process and parse its stdout stream.

Outline Introduction Monitoring the Android App usage Open source applications Closed source applications Monitoring the network QoS Passive measurements Active measurements Ping Iperf NDT

How do we monitor network QoS? Case 1: We have access to the App source code We have also access on the App s sockets & packet streams. Passively record measurements on these packet streams (e.g., measure packet loss, jitter, bitrate). Case 2: We have no access to the source code Solution 1: Use rooted Androids and tcpdump/wireshark (This would provide access to the App s packet streams). Solution 2: Send/receive additional packets and record measurements on these packet streams (Active Probing).

Case 1: We have access to the App source code Passive measurements: Add some code in specific locations of the App s source (e.g., where packets are received/sent) to record network measurements. Example: long t; while (true) { // Wait to receive a datagram socket.receive(packet); } // Record interarrival time long now = System.currentTimeMillis(); interarrival = now t; t= now;

Case 2: We have no access to the source code Active probing: The monitor application creates additional packet streams that at which it has access and performs measurements on these additional packet streams. The active probing approach degrades network performance in order to measure it! (if possible, choose a small transmission rate) Popular tools for active probing: ping, iperf, NDT

Ping Ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. Syntax: ping [-QRadfnqrv] [-c count] [-i wait] [-l preload] [-p pattern] [-P policy] [-s packetsize] [-S src_addr] [-t timeout] [host [-L] [-I interface] [-T ttl] mcast-group]

Ping Example: ping localhost Output: PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.051 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.055 ms ^C --- localhost ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.051/0.053/0.055/0.002 ms

Iperf iperf is a tool for performing network throughput measurements. It can test either TCP or UDP throughput. To perform an iperf test the user must establish both a server (to discard traffic) and a client (to generate traffic). Syntax: iperf -s [ options ] iperf -c server [ options ] iperf -u -s [ options ] iperf -u -c server [ options ]

Example (server-side): #iperf -s -u -i 1 Iperf Output: ----------------------------------------------------------- Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 8.00 KByte (default) ------------------------------------------------------------ [904] local 10.1.1.1 port 5001 connected with 10.6.2.5 port 32781 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [904] 0.0-1.0 sec 1.17 MBytes 9.84 Mbits/sec 1.830 ms 0/ 837 (0%) [904] 1.0-2.0 sec 1.18 MBytes 9.94 Mbits/sec 1.846 ms 5/ 850 (0.59%) [904] 2.0-3.0 sec 1.19 MBytes 9.98 Mbits/sec 1.802 ms 2/ 851 (0.24%) [904] 3.0-4.0 sec 1.19 MBytes 10.0 Mbits/sec 1.830 ms 0/ 850 (0%) [904] 4.0-5.0 sec 1.19 MBytes 9.98 Mbits/sec 1.846 ms 1/ 850 (0.12%) [904] 5.0-6.0 sec 1.19 MBytes 10.0 Mbits/sec 1.806 ms 0/ 851 (0%) [904] 6.0-7.0 sec 1.06 MBytes 8.87 Mbits/sec 1.803 ms 1/ 755 (0.13%) [904] 7.0-8.0 sec 1.19 MBytes 10.0 Mbits/sec 1.831 ms 0/ 850 (0%) [904] 8.0-9.0 sec 1.19 MBytes 10.0 Mbits/sec 1.841 ms 0/ 850 (0%) [904] 9.0-10.0 sec 1.19 MBytes 10.0 Mbits/sec 1.801 ms 0/ 851 (0%) [904] 0.0-10.0 sec 11.8 MBytes 9.86 Mbits/sec 2.618 ms 9/ 8409 (0.11%)

Iperf Example (client-side): #iperf -c 10.1.1.1 -u -b 10m Output: ------------------------------------------------------------ Client connecting to 10.1.1.1, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 108 KByte (default) ------------------------------------------------------------ [ 3] local 10.6.2.5 port 32781 connected with 10.1.1.1 port 5001 [ 3] 0.0-10.0 sec 11.8 MBytes 9.89 Mbits/sec [ 3] Sent 8409 datagrams [ 3] Server Report: [ 3] 0.0-10.0 sec 11.8 MBytes 9.86 Mbits/sec 2.617 ms 9/ 8409 (0.11%)

Iperf Iperf for Android:

NDT NDT (Network Diagnostic Tool) provides a sophisticated speed and diagnostic test. An NDT test reports more than just the upload and download speeds. It also attempts to determine what, if any, problems limited these speeds, differentiating between computer configuration and network infrastructure problems. While the diagnostic messages are most useful for expert users, they can also help novice users by allowing them to provide detailed trouble reports to their network administrator.

NDT NDT Android client screenshots:

Data receiver geo-db PHP application Active prober HTTP server QoE Nova monitor GO HF App tracker server server Iperf Internet Monitored Nova GO infrastructure App server Back-end interface DB Iperf Active Prober Monitor Location Monitored App Nova GO client Log GUI QoE Perf. estimator Nova QoE GO monitor HF tracker Appclient Logcat parser GUI Circular buffer Android smartphone feedback video Customer User