WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xenstat: Adding to scan blktap informatio

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenstat: Adding to scan blktap information.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Jun 2007 02:22:27 -0700
Delivery-date: Tue, 12 Jun 2007 05:07:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1181211221 -3600
# Node ID d47415adf38414e36d632e9bfa45e121ce68193c
# Parent  9c2322a4c348302b0ca1dcdd9c8364ec3811000f
xenstat: Adding to scan blktap information.
Signed-off-by: Satoshi UCHIDA <s-uchida@xxxxxxxxxxxxx>
---
 tools/xenstat/libxenstat/src/xenstat.c       |    6 ++++++
 tools/xenstat/libxenstat/src/xenstat.h       |    4 ++++
 tools/xenstat/libxenstat/src/xenstat_linux.c |   16 +++++++++++-----
 tools/xenstat/libxenstat/src/xenstat_priv.h  |    9 +++++----
 4 files changed, 26 insertions(+), 9 deletions(-)

diff -r 9c2322a4c348 -r d47415adf384 tools/xenstat/libxenstat/src/xenstat.c
--- a/tools/xenstat/libxenstat/src/xenstat.c    Thu Jun 07 11:06:00 2007 +0100
+++ b/tools/xenstat/libxenstat/src/xenstat.c    Thu Jun 07 11:13:41 2007 +0100
@@ -625,6 +625,12 @@ static void xenstat_free_vbds(xenstat_no
                free(node->domains[i].vbds);
 }
 
+/* Get the back driver type  for Virtual Block Device */
+unsigned int xenstat_vbd_type(xenstat_vbd * vbd)
+{
+       return vbd->back_type;
+}
+
 /* Get the major number of VBD device */
 unsigned int xenstat_vbd_dev(xenstat_vbd * vbd)
 {
diff -r 9c2322a4c348 -r d47415adf384 tools/xenstat/libxenstat/src/xenstat.h
--- a/tools/xenstat/libxenstat/src/xenstat.h    Thu Jun 07 11:06:00 2007 +0100
+++ b/tools/xenstat/libxenstat/src/xenstat.h    Thu Jun 07 11:13:41 2007 +0100
@@ -172,6 +172,10 @@ unsigned long long xenstat_network_tdrop
 /*
  * VBD functions - extract information from a xen_vbd
  */
+
+/* Get the back driver type  for Virtual Block Device */
+unsigned int xenstat_vbd_type(xenstat_vbd * vbd);
+
 /* Get the device number for Virtual Block Device */
 unsigned int xenstat_vbd_dev(xenstat_vbd * vbd);
 
diff -r 9c2322a4c348 -r d47415adf384 
tools/xenstat/libxenstat/src/xenstat_linux.c
--- a/tools/xenstat/libxenstat/src/xenstat_linux.c      Thu Jun 07 11:06:00 
2007 +0100
+++ b/tools/xenstat/libxenstat/src/xenstat_linux.c      Thu Jun 07 11:13:41 
2007 +0100
@@ -204,17 +204,23 @@ int xenstat_collect_vbds(xenstat_node * 
                int ret;
                char buf[256];
 
-
-               ret = sscanf(dp->d_name, "vbd-%u-%u", &domid, &vbd.dev);
-               if (ret != 2)
+               ret = sscanf(dp->d_name, "%3s-%u-%u", buf, &domid, &vbd.dev);
+               if (ret != 3)
+                       continue;
+
+               if (strcmp(buf,"vbd") == 0)
+                       vbd.back_type = 1;
+               else if (strcmp(buf,"tap") == 0)
+                       vbd.back_type = 2;
+               else
                        continue;
 
                domain = xenstat_node_domain(node, domid);
                if (domain == NULL) {
                        fprintf(stderr,
-                               "Found interface vbd-%u-%u but domain %u"
+                               "Found interface %s-%u-%u but domain %u"
                                " does not exist.\n",
-                               domid, vbd.dev, domid);
+                               buf, domid, vbd.dev, domid);
                        continue;
                }
 
diff -r 9c2322a4c348 -r d47415adf384 tools/xenstat/libxenstat/src/xenstat_priv.h
--- a/tools/xenstat/libxenstat/src/xenstat_priv.h       Thu Jun 07 11:06:00 
2007 +0100
+++ b/tools/xenstat/libxenstat/src/xenstat_priv.h       Thu Jun 07 11:13:41 
2007 +0100
@@ -87,10 +87,11 @@ struct xenstat_network {
 };
 
 struct xenstat_vbd {
-       unsigned int dev;
-       unsigned long long oo_reqs;
-       unsigned long long rd_reqs;
-       unsigned long long wr_reqs;
+       unsigned int back_type;
+       unsigned int dev;
+       unsigned long long oo_reqs;
+       unsigned long long rd_reqs;
+       unsigned long long wr_reqs;
 };
 
 extern int xenstat_collect_networks(xenstat_node * node);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenstat: Adding to scan blktap information., Xen patchbot-unstable <=