diff --git a/edge-monitoring/agent_adb/edge_monitoring_agent_adb.py b/edge-monitoring/agent_adb/edge_monitoring_agent_adb.py
index af81d5e..9d808b5 100755
--- a/edge-monitoring/agent_adb/edge_monitoring_agent_adb.py
+++ b/edge-monitoring/agent_adb/edge_monitoring_agent_adb.py
@@ -46,7 +46,9 @@
 ADB_GET_COMMANDS = {
     "apn_mode": "settings get global airplane_mode_on",
     "lte_state": "dumpsys telephony.registry | grep -m1 mDataConnectionState",
-    "ping_result": "ping -c 3 8.8.8.8&>/dev/null; echo $?"
+    "ping_result": "ping -c 3 8.8.8.8&>/dev/null; echo $?",
+    "ping_dns_result": "ping -c 10 " + "8.8.8.8" +
+                    " | tail -1 | awk '{print $4}'"
 }
 ADB_APN_COMMANDS = {
     "home": "input keyevent 3",
@@ -73,6 +75,16 @@
     'status': {
         'control_plane': None,
         'user_plane': 'connected'
+    },
+    'speedtest': {
+        'ping': {
+            'dns': {
+                'min': None,
+                'avg': None,
+                'max': None,
+                'stddev': None
+            }
+        }
     }
 }
 
@@ -138,6 +150,39 @@
     return state, None
 
 
+def run_ping_test(adb, ip, count):
+    '''
+    Runs the ping test
+    Input: IP to ping, # times to ping
+    Returns: dict of the min/avg/max/stddev numbers from the ping command result
+    '''
+    result = {'min': None,
+              'avg': None,
+              'max': None,
+              'stddev': None}
+    try:
+        commandResult, commandOutput = _run_adb_shell(adb, ADB_GET_COMMANDS['ping_dns_result'])
+        pingResult = commandOutput.split("/")
+        result = {'min': float(pingResult[0]),
+                  'avg': float(pingResult[1]),
+                  'max': float(pingResult[2]),
+                  'stddev': float(pingResult[3])}
+    except Exception as e:
+        logging.error("Ping test failed for " + ip + ": %s", e)
+    return result
+
+
+def get_ping_test(adb):
+    '''
+    Each ping test result saves the min/avg/max/stddev to dict.
+    1) Performs ping test to Google Public DNS for 10 iterations.
+    2) # TODO: Performs ping to device on network.
+    '''
+    speedtest_ping = {}
+    speedtest_ping['dns'] = run_ping_test(adb, "8.8.8.8", 10)
+    return speedtest_ping
+
+
 def report_aether_network_state():
     '''
     report the aether network state to the monitoring server
@@ -176,9 +221,11 @@
         _run_adb_shell(adb, "svc power stayon true")
         cp_state, err = get_control_plane_state(adb)
         up_state, err = get_user_plane_state(adb)
+        speedtest_ping = get_ping_test(adb)
 
         edge_status['status']['control_plane'] = cp_state.name
         edge_status['status']['user_plane'] = up_state.name
+        edge_status['speedtest']['ping'] = speedtest_ping
 
         report_aether_network_state()
         _run_adb_shell(adb, "svc power stayon false")
diff --git a/edge-monitoring/agent_modem/edge_monitoring_agent_modem.py b/edge-monitoring/agent_modem/edge_monitoring_agent_modem.py
index a9a89f0..0744304 100755
--- a/edge-monitoring/agent_modem/edge_monitoring_agent_modem.py
+++ b/edge-monitoring/agent_modem/edge_monitoring_agent_modem.py
@@ -22,6 +22,7 @@
 import requests
 import time
 import serial
+import subprocess
 from collections import namedtuple
 
 '''
@@ -47,6 +48,16 @@
     'status': {
         'control_plane': None,
         'user_plane': None
+    },
+    'speedtest': {
+        'ping': {
+            'dns': {
+                'min': None,
+                'avg': None,
+                'max': None,
+                'stddev': None
+            }
+        }
     }
 }
 
@@ -175,9 +186,45 @@
     return State.connected if resp is 0 else State.disconnected, None
 
 
-def report_status(cp_state, up_state):
+def run_ping_test(ip, count):
+    '''
+    Runs the ping test
+    Input: IP to ping, # times to ping
+    Returns: dict of the min/avg/max/stddev numbers from the ping command result
+    '''
+    result = {'min': None,
+              'avg': None,
+              'max': None,
+              'stddev': None}
+    try:
+        pingResult = subprocess.check_output(
+                "ping -c " + str(count) + " " + ip + \
+                " | tail -1 | awk '{print $4}'",
+                shell=True).decode("UTF-8").split("/")
+        result = {'min': float(pingResult[0]),
+                  'avg': float(pingResult[1]),
+                  'max': float(pingResult[2]),
+                  'stddev': float(pingResult[3])}
+    except Exception as e:
+        logging.error("Ping test failed for " + ip + ": %s", e)
+    return result
+
+
+def get_ping_test(modem):
+    '''
+    Each ping test result saves the min/avg/max/stddev to dict.
+    1) Performs ping test to Google Public DNS for 10 iterations.
+    2) # TODO: Performs ping to device on network.
+    '''
+    speedtest_ping = {}
+    speedtest_ping['dns'] = run_ping_test("8.8.8.8", 10)
+    return speedtest_ping
+
+
+def report_status(cp_state, up_state, speedtest_ping):
     report['status']['control_plane'] = cp_state.name
     report['status']['user_plane'] = up_state.name
+    report['speedtest']['ping'] = speedtest_ping
 
     logging.info("Sending report %s", report)
     try:
@@ -209,12 +256,13 @@
     while True:
         cp_state, cp_msg = get_control_plane_state(modem)
         up_state, up_msg = get_user_plane_state(modem)
+        speedtest_ping = get_ping_test(modem)
 
         if cp_state is State.error:
             logging.error("Modem is in error state.")
             sys.exit(1)
 
-        report_status(cp_state, up_state)
+        report_status(cp_state, up_state, speedtest_ping)
         time.sleep(CONF.report_interval)
 
     modem.close()
