direct-io.hg

changeset 6364:6783e59e1c45

xenstat/xentop merge.
author cl349@firebug.cl.cam.ac.uk
date Tue Aug 23 18:25:51 2005 +0000 (2005-08-23)
parents 43d91cbb1bfb 79df8d5fc424
children 522bc50588ed
files .hgignore Config.mk Makefile buildconfigs/Rules.mk docs/src/user.tex extras/mini-os/include/time.h extras/mini-os/kernel.c extras/mini-os/time.c linux-2.6-xen-sparse/arch/xen/Kconfig linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_64 linux-2.6-xen-sparse/arch/xen/i386/Kconfig linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c linux-2.6-xen-sparse/arch/xen/i386/kernel/ioport.c linux-2.6-xen-sparse/arch/xen/i386/kernel/ldt.c linux-2.6-xen-sparse/arch/xen/i386/kernel/mpparse.c linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6-xen-sparse/arch/xen/i386/kernel/smp.c linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6-xen-sparse/arch/xen/i386/mm/init.c linux-2.6-xen-sparse/arch/xen/i386/mm/ioremap.c linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6-xen-sparse/arch/xen/i386/pci/Makefile linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6-xen-sparse/arch/xen/kernel/reboot.c linux-2.6-xen-sparse/arch/xen/kernel/skbuff.c linux-2.6-xen-sparse/arch/xen/x86_64/Kconfig linux-2.6-xen-sparse/arch/xen/x86_64/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/ia32/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/kernel/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/kernel/apic.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/entry.S linux-2.6-xen-sparse/arch/xen/x86_64/kernel/pci-nommu.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/process.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/smpboot.c linux-2.6-xen-sparse/arch/xen/x86_64/kernel/vsyscall.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/ioremap.c linux-2.6-xen-sparse/arch/xen/x86_64/pci/Makefile linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6-xen-sparse/drivers/xen/blkback/Makefile linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6-xen-sparse/drivers/xen/blkback/common.h linux-2.6-xen-sparse/drivers/xen/blkback/interface.c linux-2.6-xen-sparse/drivers/xen/blkback/vbd.c linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6-xen-sparse/drivers/xen/blkfront/block.h linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap.h linux-2.6-xen-sparse/drivers/xen/blktap/blktap_controlmsg.c linux-2.6-xen-sparse/drivers/xen/blktap/blktap_userdev.c linux-2.6-xen-sparse/drivers/xen/console/console.c linux-2.6-xen-sparse/drivers/xen/netback/common.h linux-2.6-xen-sparse/drivers/xen/netback/interface.c linux-2.6-xen-sparse/drivers/xen/netback/netback.c linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6-xen-sparse/drivers/xen/usbback/usbback.c linux-2.6-xen-sparse/drivers/xen/usbfront/usbfront.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c linux-2.6-xen-sparse/include/asm-xen/asm-i386/desc.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/fixmap.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/hypercall.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/mmu_context.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pci.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/desc.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/dma-mapping.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/page.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pci.h linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h linux-2.6-xen-sparse/include/asm-xen/balloon.h linux-2.6-xen-sparse/include/asm-xen/hypervisor.h linux-2.6-xen-sparse/include/asm-xen/xenbus.h linux-2.6-xen-sparse/include/linux/highmem.h linux-2.6-xen-sparse/include/linux/mm.h linux-2.6-xen-sparse/mm/highmem.c linux-2.6-xen-sparse/mm/memory.c tools/Makefile tools/Rules.mk tools/console/daemon/io.c tools/debugger/libxendebug/xendebug.c tools/debugger/libxendebug/xendebug.h tools/debugger/pdb/Domain.ml tools/debugger/pdb/Domain.mli tools/debugger/pdb/Makefile tools/debugger/pdb/PDB.ml tools/debugger/pdb/Process.ml tools/debugger/pdb/Process.mli tools/debugger/pdb/debugger.ml tools/debugger/pdb/linux-2.6-module/debug.c tools/debugger/pdb/linux-2.6-module/module.c tools/debugger/pdb/linux-2.6-module/pdb_debug.h tools/debugger/pdb/linux-2.6-module/pdb_module.h tools/debugger/pdb/linux-2.6-patches/i386_ksyms.patch tools/debugger/pdb/pdb_caml_domain.c tools/debugger/pdb/pdb_caml_process.c tools/debugger/pdb/pdb_caml_xcs.c tools/debugger/pdb/readme tools/examples/Makefile tools/examples/xend-config.sxp tools/examples/xmexample.vmx tools/ioemu/hw/ide.c tools/libxc/Makefile tools/libxc/xc.h tools/libxc/xc_core.c tools/libxc/xc_gnttab.c tools/libxc/xc_linux_build.c tools/libxc/xc_linux_restore.c tools/libxc/xc_linux_save.c tools/libxc/xc_load_elf.c tools/libxc/xc_ptrace.c tools/libxc/xc_vmx_build.c tools/misc/xend tools/python/setup.py tools/python/xen/lowlevel/xu/xu.c tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/XendRoot.py tools/python/xen/xend/image.py tools/python/xen/xend/server/blkif.py tools/python/xen/xend/server/controller.py tools/python/xen/xend/server/event.py tools/python/xen/xend/server/netif.py tools/python/xen/xend/server/relocate.py tools/python/xen/xm/create.py tools/python/xen/xm/main.py tools/security/Makefile tools/security/secpol_tool.c tools/xenstat/Makefile tools/xenstat/libxenstat/COPYING tools/xenstat/libxenstat/Makefile tools/xenstat/libxenstat/bindings/swig/perl/.empty tools/xenstat/libxenstat/bindings/swig/python/.empty tools/xenstat/libxenstat/bindings/swig/xenstat.i tools/xenstat/libxenstat/src/xen-interface.c tools/xenstat/libxenstat/src/xen-interface.h tools/xenstat/libxenstat/src/xenstat.c tools/xenstat/libxenstat/src/xenstat.h tools/xenstat/xentop/Makefile tools/xenstat/xentop/TODO tools/xenstat/xentop/xentop.1 tools/xenstat/xentop/xentop.c tools/xenstore/xenstored.h tools/xenstore/xenstored_core.c tools/xentrace/xentrace.c xen/Rules.mk xen/arch/ia64/grant_table.c xen/arch/ia64/xenmisc.c xen/arch/ia64/xentime.c xen/arch/x86/domain.c xen/arch/x86/domain_build.c xen/arch/x86/mm.c xen/arch/x86/physdev.c xen/arch/x86/setup.c xen/arch/x86/shadow.c xen/arch/x86/shadow32.c xen/arch/x86/time.c xen/arch/x86/traps.c xen/arch/x86/vmx.c xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/traps.c xen/common/domain.c xen/common/event_channel.c xen/common/grant_table.c xen/common/lib.c xen/common/perfc.c xen/common/schedule.c xen/common/trace.c xen/drivers/char/console.c xen/include/asm-x86/e820.h xen/include/asm-x86/mm.h xen/include/asm-x86/page.h xen/include/asm-x86/shadow.h xen/include/asm-x86/uaccess.h xen/include/asm-x86/vmx_vmcs.h xen/include/asm-x86/x86_32/page-3level.h xen/include/asm-x86/x86_32/uaccess.h xen/include/public/arch-ia64.h xen/include/public/arch-x86_32.h xen/include/public/arch-x86_64.h xen/include/public/dom0_ops.h xen/include/public/grant_table.h xen/include/public/io/blkif.h xen/include/public/io/domain_controller.h xen/include/public/io/netif.h xen/include/public/physdev.h xen/include/public/xen.h xen/include/xen/grant_table.h xen/include/xen/sched.h xen/include/xen/time.h
line diff
   163.1 --- a/tools/xenstat/libxenstat/src/xen-interface.c	Mon Aug 22 23:07:37 2005 +0000
   163.2 +++ b/tools/xenstat/libxenstat/src/xen-interface.c	Tue Aug 23 18:25:51 2005 +0000
   163.3 @@ -21,7 +21,9 @@
   163.4  #include <sys/mman.h>
   163.5  #include <stdio.h>
   163.6  #include <stdlib.h>
   163.7 +#include <string.h>
   163.8  #include <unistd.h>
   163.9 +#include "version.h"
  163.10  #include "privcmd.h"
  163.11  #include "xen.h"
  163.12  
  163.13 @@ -56,24 +58,69 @@ void xi_uninit(xi_handle *handle)
  163.14  	free (handle);
  163.15  }
  163.16  
  163.17 -/* Make Xen hypervisor call */
  163.18 -int xi_make_dom0_op(xi_handle *handle, dom0_op_t *op, int opcode)
  163.19 +/* Make simple xen version hypervisor calls */
  163.20 +static int xi_make_xen_version_hypercall(xi_handle *handle, long *vnum, xen_extraversion_t *ver)
  163.21 +{
  163.22 +	privcmd_hypercall_t privcmd;
  163.23 +	multicall_entry_t multicall[2];
  163.24 +	int ret = 0;
  163.25 +
  163.26 +	/* set up for doing hypercall */
  163.27 +	privcmd.op = __HYPERVISOR_multicall; 
  163.28 +	privcmd.arg[0] = (unsigned long)multicall;
  163.29 +	privcmd.arg[1] = 2;
  163.30 +
  163.31 +	/* first one to get xen version number */
  163.32 +	multicall[0].op = __HYPERVISOR_xen_version;
  163.33 +	multicall[0].args[0] = (unsigned long)XENVER_version;
  163.34 +
  163.35 +	/* second to get xen version flag */
  163.36 +	multicall[1].op = __HYPERVISOR_xen_version; 
  163.37 +	multicall[1].args[0] = (unsigned long)XENVER_extraversion;
  163.38 +	multicall[1].args[1] = (unsigned long)ver;
  163.39 +
  163.40 +	if (mlock( &privcmd, sizeof(privcmd_hypercall_t)) < 0) {
  163.41 +		perror("Failed to mlock privcmd structure");
  163.42 +		return -1;
  163.43 +	}
  163.44 +
  163.45 +	if (mlock( multicall, sizeof(multicall_entry_t)) < 0) {
  163.46 +		perror("Failed to mlock multicall_entry structure");
  163.47 +		munlock( &multicall, sizeof(multicall_entry_t));
  163.48 +		return -1;
  163.49 +	}
  163.50 +
  163.51 +	if (ioctl( handle->fd, IOCTL_PRIVCMD_HYPERCALL, &privcmd) < 0) {
  163.52 +		perror("Hypercall failed");
  163.53 +		ret = -1;
  163.54 +	}
  163.55 +
  163.56 +	*vnum = multicall[0].result;
  163.57 +
  163.58 +	munlock( &privcmd, sizeof(privcmd_hypercall_t));
  163.59 +	munlock( &multicall, sizeof(multicall_entry_t));
  163.60 +
  163.61 +	return ret;
  163.62 +}
  163.63 +
  163.64 +/* Make Xen Dom0 op hypervisor call */
  163.65 +static int xi_make_dom0_op(xi_handle *handle, dom0_op_t *dom_op, int dom_opcode)
  163.66  {
  163.67  	privcmd_hypercall_t privcmd;
  163.68  	int ret = 0;
  163.69  
  163.70  	/* set up for doing hypercall */
  163.71  	privcmd.op = __HYPERVISOR_dom0_op;
  163.72 -	privcmd.arg[0] = (unsigned long)op;
  163.73 -	op->cmd = opcode;
  163.74 -	op->interface_version = DOM0_INTERFACE_VERSION;
  163.75 +	privcmd.arg[0] = (unsigned long)dom_op;
  163.76 +	dom_op->cmd = dom_opcode;
  163.77 +	dom_op->interface_version = DOM0_INTERFACE_VERSION;
  163.78  
  163.79  	if (mlock( &privcmd, sizeof(privcmd_hypercall_t)) < 0) {
  163.80  		perror("Failed to mlock privcmd structure");
  163.81  		return -1;
  163.82  	}
  163.83  
  163.84 -	if (mlock( op, sizeof(dom0_op_t)) < 0) {
  163.85 +	if (mlock( dom_op, sizeof(dom0_op_t)) < 0) {
  163.86  		perror("Failed to mlock dom0_op structure");
  163.87  		munlock( &privcmd, sizeof(privcmd_hypercall_t));
  163.88  		return -1;
  163.89 @@ -85,7 +132,7 @@ int xi_make_dom0_op(xi_handle *handle, d
  163.90  	}
  163.91  
  163.92  	munlock( &privcmd, sizeof(privcmd_hypercall_t));
  163.93 -	munlock( op, sizeof(dom0_op_t));
  163.94 +	munlock( dom_op, sizeof(dom0_op_t));
  163.95  
  163.96  	return ret;
  163.97  }
  163.98 @@ -142,3 +189,16 @@ long long xi_get_vcpu_usage(xi_handle *h
  163.99  
 163.100  	return op.u.getvcpucontext.cpu_time;
 163.101  }
 163.102 +
 163.103 +/* gets xen version information from hypervisor */
 163.104 +int xi_get_xen_version(xi_handle *handle, long *vnum, xen_extraversion_t *ver) 
 163.105 +{
 163.106 +
 163.107 +        /* gets the XENVER_version and XENVER_extraversion */
 163.108 +	if (xi_make_xen_version_hypercall( handle, vnum, ver) < 0) {; 
 163.109 +		perror("XEN VERSION Hypercall failed");
 163.110 +		return -1;
 163.111 +	}
 163.112 +
 163.113 +	return 0;
 163.114 +}
   164.1 --- a/tools/xenstat/libxenstat/src/xen-interface.h	Mon Aug 22 23:07:37 2005 +0000
   164.2 +++ b/tools/xenstat/libxenstat/src/xen-interface.h	Tue Aug 23 18:25:51 2005 +0000
   164.3 @@ -27,6 +27,7 @@ typedef uint32_t u32;
   164.4  typedef uint64_t u64;
   164.5  
   164.6  #include "dom0_ops.h"
   164.7 +#include "version.h"
   164.8  
   164.9  /* Opaque handles */
  164.10  typedef struct xi_handle xi_handle;
  164.11 @@ -38,6 +39,9 @@ xi_handle *xi_init();
  164.12  /* Release the handle to libxc, free resources, etc. */
  164.13  void xi_uninit(xi_handle *handle);
  164.14  
  164.15 +/* Obtain xen version information from hypervisor */
  164.16 +int xi_get_xen_version(xi_handle *, long *vnum, xen_extraversion_t *ver);
  164.17 +
  164.18  /* Obtain physinfo data from dom0 */
  164.19  int xi_get_physinfo(xi_handle *, dom0_physinfo_t *);
  164.20  
   165.1 --- a/tools/xenstat/libxenstat/src/xenstat.c	Mon Aug 22 23:07:37 2005 +0000
   165.2 +++ b/tools/xenstat/libxenstat/src/xenstat.c	Tue Aug 23 18:25:51 2005 +0000
   165.3 @@ -22,6 +22,7 @@
   165.4  #include <unistd.h>
   165.5  #include <xen-interface.h>
   165.6  #include "xenstat.h"
   165.7 +#include "version.h"
   165.8  
   165.9  /*
  165.10   * Types
  165.11 @@ -32,6 +33,9 @@ struct xenstat_handle {
  165.12  	FILE *procnetdev;
  165.13  };
  165.14  
  165.15 +#define SHORT_ASC_LEN 5 		/* length of 65535 */
  165.16 +#define VERSION_SIZE (2 * SHORT_ASC_LEN + 1 + sizeof(xen_extraversion_t) + 1)
  165.17 +
  165.18  struct xenstat_node {
  165.19  	unsigned int flags;
  165.20  	unsigned long long cpu_hz;
  165.21 @@ -39,6 +43,7 @@ struct xenstat_node {
  165.22  	unsigned long long tot_mem;
  165.23  	unsigned long long free_mem;
  165.24  	unsigned int num_domains;
  165.25 +	char xen_version[VERSION_SIZE]; /* xen version running on this node */
  165.26  	xenstat_domain *domains;	/* Array of length num_domains */
  165.27  };
  165.28  
  165.29 @@ -47,7 +52,7 @@ struct xenstat_domain {
  165.30  	unsigned int state;
  165.31  	unsigned long long cpu_ns;
  165.32  	unsigned int num_vcpus;
  165.33 -	xenstat_vcpu *vcpus;	/* Array of length num_vcpus */
  165.34 +	xenstat_vcpu *vcpus;		/* Array of length num_vcpus */
  165.35  	unsigned long long cur_mem;	/* Current memory reservation */
  165.36  	unsigned long long max_mem;	/* Total memory allowed */
  165.37  	unsigned int ssid;
  165.38 @@ -164,6 +169,8 @@ xenstat_node *xenstat_get_node(xenstat_h
  165.39  #define DOMAIN_CHUNK_SIZE 256
  165.40  	xenstat_node *node;
  165.41  	dom0_physinfo_t physinfo;
  165.42 +	xen_extraversion_t version;
  165.43 +	long vnum = 0; 
  165.44  	dom0_getdomaininfo_t domaininfo[DOMAIN_CHUNK_SIZE];
  165.45  	unsigned int num_domains, new_domains;
  165.46  	unsigned int i;
  165.47 @@ -179,6 +186,14 @@ xenstat_node *xenstat_get_node(xenstat_h
  165.48  		return NULL;
  165.49  	}
  165.50  
  165.51 +	/* Get the xen version number and xen version tag */
  165.52 +	if (xi_get_xen_version(handle->xihandle, &vnum, &version) < 0) {
  165.53 +		free(node); 
  165.54 +		return NULL;
  165.55 +	} 
  165.56 +	snprintf(node->xen_version, VERSION_SIZE,
  165.57 +		"%ld.%ld%s\n", ((vnum >> 16) & 0xFFFF), vnum & 0xFFFF, (char *)version); 
  165.58 +
  165.59  	node->cpu_hz = ((unsigned long long)physinfo.cpu_khz) * 1000ULL;
  165.60  	node->num_cpus =
  165.61  	    (physinfo.threads_per_core * physinfo.cores_per_socket *
  165.62 @@ -247,8 +262,8 @@ xenstat_node *xenstat_get_node(xenstat_h
  165.63  			if(collectors[i].collect(handle, node) == 0) {
  165.64  				xenstat_free_node(node);
  165.65  				return NULL;
  165.66 -                        }
  165.67 -                }
  165.68 +			}
  165.69 +		}
  165.70  	}
  165.71  
  165.72  	return node;
  165.73 @@ -291,6 +306,11 @@ xenstat_domain *xenstat_node_domain_by_i
  165.74  	return NULL;
  165.75  }
  165.76  
  165.77 +const char *xenstat_node_xen_ver(xenstat_node * node)
  165.78 +{
  165.79 +	return node->xen_version;
  165.80 +}
  165.81 +
  165.82  unsigned long long xenstat_node_tot_mem(xenstat_node * node)
  165.83  {
  165.84  	return node->tot_mem;
  165.85 @@ -505,7 +525,7 @@ static int xenstat_collect_networks(xens
  165.86  		unsigned int domid;
  165.87  		int ret = fscanf(handle->procnetdev,
  165.88  				 "vif%u.%u:%llu%llu%llu%llu%*u%*u%*u%*u"
  165.89 -				 "%llu%llu%llu%llu%*u%*u%*u%*u",
  165.90 +				 "%llu%llu%llu%llu%*u%*u%*u%*u\n",
  165.91  				 &domid, &net.id,
  165.92  				 &net.tbytes, &net.tpackets, &net.terrs,
  165.93  				 &net.tdrop,
   166.1 --- a/tools/xenstat/libxenstat/src/xenstat.h	Mon Aug 22 23:07:37 2005 +0000
   166.2 +++ b/tools/xenstat/libxenstat/src/xenstat.h	Tue Aug 23 18:25:51 2005 +0000
   166.3 @@ -51,6 +51,8 @@ xenstat_domain *xenstat_node_domain(xens
   166.4  /* Get the domain with the given index; used to loop over all domains. */
   166.5  xenstat_domain *xenstat_node_domain_by_index(xenstat_node * node,
   166.6  					     unsigned index);
   166.7 +/* Get xen version of the node */
   166.8 +const char *xenstat_node_xen_ver(xenstat_node * node);
   166.9  
  166.10  /* Get amount of total memory on a node */
  166.11  unsigned long long xenstat_node_tot_mem(xenstat_node * node);
   169.1 --- a/tools/xenstat/xentop/xentop.1	Mon Aug 22 23:07:37 2005 +0000
   169.2 +++ b/tools/xenstat/xentop/xentop.1	Tue Aug 23 18:25:51 2005 +0000
   169.3 @@ -40,7 +40,7 @@ display help and exit
   169.4  output version information and exit
   169.5  .TP
   169.6  \fB\-d\fR, \fB\-\-delay\fR=\fISECONDS\fR
   169.7 -seconds between updates (default 1)
   169.8 +seconds between updates (default 3)
   169.9  .TP
  169.10  \fB\-n\fR, \fB\-\-networks\fR
  169.11  output network information
   170.1 --- a/tools/xenstat/xentop/xentop.c	Mon Aug 22 23:07:37 2005 +0000
   170.2 +++ b/tools/xenstat/xentop/xentop.c	Tue Aug 23 18:25:51 2005 +0000
   170.3 @@ -151,7 +151,7 @@ xenstat_node *prev_node = NULL;
   170.4  xenstat_node *cur_node = NULL;
   170.5  field_id sort_field = FIELD_DOMID;
   170.6  unsigned int first_domain_index = 0;
   170.7 -unsigned int delay = 1;
   170.8 +unsigned int delay = 3;
   170.9  int show_vcpus = 0;
  170.10  int show_networks = 0;
  170.11  int repeat_header = 0;
  170.12 @@ -174,7 +174,7 @@ static void usage(const char *program)
  170.13  	       "Displays ongoing information about xen vm resources \n\n"
  170.14  	       "-h, --help           display this help and exit\n"
  170.15  	       "-V, --version        output version information and exit\n"
  170.16 -	       "-d, --delay=SECONDS  seconds between updates (default 1)\n"
  170.17 +	       "-d, --delay=SECONDS  seconds between updates (default 3)\n"
  170.18  	       "-n, --networks       output vif network data\n"
  170.19  	       "-r, --repeat-header  repeat table header before each domain\n"
  170.20  	       "-v, --vcpus          output vcpu data\n"
  170.21 @@ -254,7 +254,7 @@ static void attr_addstr(int attr, const 
  170.22  static void set_delay(char *value)
  170.23  {
  170.24  	int new_delay;
  170.25 -	new_delay = atoi(prompt_val);
  170.26 +	new_delay = atoi(value);
  170.27  	if(new_delay > 0)
  170.28  		delay = new_delay;
  170.29  }