diff --git a/xos/core/xoslib/dashboards/xosHpcUrls.html b/xos/core/xoslib/dashboards/xosHpcUrls.html
new file mode 100644
index 0000000..4bfa263
--- /dev/null
+++ b/xos/core/xoslib/dashboards/xosHpcUrls.html
@@ -0,0 +1,32 @@
+<script src="{{ STATIC_URL }}/js/vendor/underscore-min.js"></script>
+<script src="{{ STATIC_URL }}/js/vendor/backbone.js"></script>
+<script src="{{ STATIC_URL }}/js/vendor/backbone.syphon.js"></script>
+<script src="{{ STATIC_URL }}/js/vendor/backbone.wreqr.js"></script>
+<script src="{{ STATIC_URL }}/js/vendor/backbone.babysitter.js"></script>
+<script src="{{ STATIC_URL }}/js/vendor/backbone.marionette.js"></script>
+
+<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
+<link rel="stylesheet" type="text/css" href="{% static 'css/xosTenantDashboard.css' %}" media="all" >
+<link rel="stylesheet" type="text/css" href="{% static 'css/xosAdminSite.css' %}" media="all" >
+
+<script src="{{ STATIC_URL }}/js/xoslib/xos-util.js"></script>
+<script src="{{ STATIC_URL }}/js/xoslib/xos-defaults.js"></script>
+<script src="{{ STATIC_URL }}/js/xoslib/xos-validators.js"></script>
+<script src="{{ STATIC_URL }}/js/xoslib/xos-backbone.js"></script>
+<script src="{{ STATIC_URL }}/js/xoslib/xosHelper.js"></script>
+<script src="{{ STATIC_URL }}/js/xosHpcUrls.js"></script>
+
+<div id="xos-hpc-view-panel"> <!-- contentPanel"> -->
+<div id="contentTitle">
+</div>
+
+<div id="contentInner">
+
+Node: <select id="xos-hpc-node-select"></select>
+
+<div id="xos-hpc-urls"></div>
+
+</div> <!-- end contentInner -->
+</div> <!-- end contentPanel -->
+
+{% include 'xosAdmin.html' %}
diff --git a/xos/core/xoslib/static/js/xosHpcUrls.js b/xos/core/xoslib/static/js/xosHpcUrls.js
new file mode 100644
index 0000000..3a8cfe0
--- /dev/null
+++ b/xos/core/xoslib/static/js/xosHpcUrls.js
@@ -0,0 +1,91 @@
+SC_HPC_FETCH = 3600;
+
+var hpc_data = null;
+
+function updateHpcUrlTable() {
+    hpcnode = null;
+    selected_node_name = $("#xos-hpc-node-select").val();
+
+    for (index in hpc_data) {
+        if (hpc_data[index].name == selected_node_name) {
+            hpcnode = hpc_data[index];
+        };
+    }
+
+    if (hpcnode == null) {
+       $("#xos-hpc-urls").html("select a node");
+       return;
+    }
+
+    $('#xos-hpc-urls').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="dynamic_hpc_urls"></table>' );
+    var actualEntries = [];
+
+    if (parseInt(hpcnode["watcher.HPC-fetch.time"])> SC_HPC_FETCH) {
+        $("#xos-hpc-urls").html("stale");
+        return;
+    }
+
+    urls = hpcnode["watcher.HPC-fetch.urls"];
+
+    for (index in urls) {
+        url = urls[index];
+        bytes_downloaded=url[2];
+        total_time = url[3];
+        if (total_time > 0) {
+            KBps = Math.round(bytes_downloaded/total_time/1024.0);
+        } else {
+            KBps = 0;
+        }
+        actualEntries.push( [url[0], url[1], bytes_downloaded, total_time, KBps] );
+    }
+
+    oTable = $('#dynamic_hpc_urls').dataTable( {
+        "bJQueryUI": true,
+        "aaData":  actualEntries ,
+        "bStateSave": true,
+        "bFilter": false,
+        "bPaginate": false,
+        "aoColumns": [
+            { "sTitle": "Url", },
+            { "sTitle": "Status" },
+            { "sTitle": "Bytes_Downloaded" },
+            { "sTitle": "Total_Time" },
+            { "sTitle": "KBps" },
+        ]
+    } );
+}
+
+function updateNodeList() {
+    selected_node_name = $("#xos-hpc-node-select").val();
+
+    options = [];
+    for (index in hpc_data) {
+        node = hpc_data[index];
+        if (node.name == selected_node_name) {
+            options.push("<option value=\"" + node.name + "\" selected>" + node.name + "</option>");
+        } else {
+            options.push("<option value=\"" + node.name + "\">" + node.name + "</option>");
+        }
+    }
+
+    $("#xos-hpc-node-select").html(options);
+}
+
+function updateHpcView(data) {
+    data = data[0];
+    hpc_data = data.attributes.hpc;
+    updateNodeList();
+    updateHpcUrlTable();
+}
+
+$(document).ready(function(){
+    xos.hpcview.on("change", function() { console.log("change"); updateHpcView(xos.hpcview.models); });
+    xos.hpcview.on("remove", function() { console.log("sort"); updateHpcView(xos.hpcview.models); });
+    xos.hpcview.on("sort", function() { console.log("sort"); updateHpcView(xos.hpcview.models); });
+
+    $("#xos-hpc-node-select").click( function() { updateHpcUrlTable(); } );
+
+    xos.hpcview.startPolling();
+});
+
+
diff --git a/xos/observers/hpc/hpc_watcher.py b/xos/observers/hpc/hpc_watcher.py
index 2af9d00..e3a316f 100644
--- a/xos/observers/hpc/hpc_watcher.py
+++ b/xos/observers/hpc/hpc_watcher.py
@@ -282,6 +282,7 @@
                 return
 
         except Exception, e:
+            #traceback.print_exc()
             job["status"] = "Exception: %s" % str(e)
             return
 
@@ -371,9 +372,10 @@
 
         raise ValueError("Couldn't find network %s" % str(network_name))
 
-    def set_status(self, sliver, service, kind, msg):
+    def set_status(self, sliver, service, kind, msg, check_error=True):
         #print sliver.node.name, kind, msg
-        sliver.has_error = (msg!="success")
+        if check_error:
+            sliver.has_error = (msg!="success")
 
         sliver_type = ContentType.objects.get_for_model(sliver)
 
@@ -529,19 +531,22 @@
             result = self.fetch_queue.get_result()
             sliver = result["sliver"]
             if (result["status"] == "success"):
-                sliver.url_status.append( (result["url"], "success", result["bytes_downloaded"], result["total_time"]) )
+                sliver.url_status.append( (result["domain"] + result["url"], "success", result["bytes_downloaded"], result["total_time"]) )
             if (result["status"]!="success") and (not sliver.has_error):
                 self.set_status(sliver, service, "watcher.HPC-fetch", result["status"])
 
         for sliver in slivers:
-            self.set_status(sliver, service, "watcher.HPC-fetch-urls", json.dumps(sliver.url_status))
+            self.set_status(sliver, service, "watcher.HPC-fetch-urls", json.dumps(sliver.url_status), check_error=False)
             if not sliver.has_error:
                 self.set_status(sliver, service, "watcher.HPC-fetch", "success")
 
     def run_once(self):
         for hpcService in HpcService.objects.all():
             for slice in self.get_service_slices(hpcService, "hpc"):
-                self.fetch_hpc(hpcService, slice.slivers.all())
+                try:
+                    self.fetch_hpc(hpcService, slice.slivers.all())
+                except:
+                    traceback.print_exc()
 
     def run(self):
         while True:
