ovs-bugtool: Add -s to "ovs-dpctl show" command, to show vport statistics.
[sliver-openvswitch.git] / utilities / bugtool / ovs-bugtool.in
index b628939..d7948d9 100755 (executable)
@@ -390,7 +390,7 @@ def collect_data():
 
 def main(argv = None):
     global ANSWER_YES_TO_ALL, SILENT_MODE
-    global entries, data, dbg
+    global entries, data, dbg, unlimited_data
 
     # we need access to privileged files, exit if we are not running as root
     if os.getuid() != 0:
@@ -588,7 +588,7 @@ exclude those logs from the archive.
     file_output(CAP_NETWORK_STATUS, [PROC_NET_SOFTNET_STAT])
     tree_output(CAP_NETWORK_STATUS, OPENVSWITCH_LOG_DIR)
     if os.path.exists(OPENVSWITCH_VSWITCHD_PID):
-        cmd_output(CAP_NETWORK_STATUS, [OVS_DPCTL, 'show'])
+        cmd_output(CAP_NETWORK_STATUS, [OVS_DPCTL, 'show', '-s'])
         for d in dp_list():
             cmd_output(CAP_NETWORK_STATUS, [OVS_OFCTL, 'show', d])
             cmd_output(CAP_NETWORK_STATUS, [OVS_OFCTL, 'dump-flows', d])
@@ -599,7 +599,7 @@ exclude those logs from the archive.
             vspidfile.close()
             for b in bond_list(vspid):
                 cmd_output(CAP_NETWORK_STATUS,
-                           [OVS_APPCTL, '-t', '/var/run/ovs-vswitchd.%s.ctl' % vspid, '-e' 'bond/show %s' % b],
+                           [OVS_APPCTL, '-t', '@RUNDIR@/ovs-vswitchd.%s.ctl' % vspid, '-e' 'bond/show %s' % b],
                            'ovs-appctl-bond-show-%s.out' % b)
         except e:
             pass
@@ -778,7 +778,7 @@ def dp_list():
 
 def bond_list(pid):
     output = StringIO.StringIO()
-    procs = [ProcOutput([OVS_APPCTL, '-t', '/var/run/ovs-vswitchd.%s.ctl' % pid, '-e' 'bond/list'], caps[CAP_NETWORK_STATUS][MAX_TIME], output)]
+    procs = [ProcOutput([OVS_APPCTL, '-t', '@RUNDIR@/ovs-vswitchd.%s.ctl' % pid, '-e' 'bond/list'], caps[CAP_NETWORK_STATUS][MAX_TIME], output)]
 
     run_procs([procs])