ia64/xen-unstable

changeset 6379: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
     1.1 --- a/tools/xenstat/libxenstat/src/xen-interface.c	Mon Aug 22 23:07:37 2005 +0000
     1.2 +++ b/tools/xenstat/libxenstat/src/xen-interface.c	Tue Aug 23 18:25:51 2005 +0000
     1.3 @@ -21,7 +21,9 @@
     1.4  #include <sys/mman.h>
     1.5  #include <stdio.h>
     1.6  #include <stdlib.h>
     1.7 +#include <string.h>
     1.8  #include <unistd.h>
     1.9 +#include "version.h"
    1.10  #include "privcmd.h"
    1.11  #include "xen.h"
    1.12  
    1.13 @@ -56,24 +58,69 @@ void xi_uninit(xi_handle *handle)
    1.14  	free (handle);
    1.15  }
    1.16  
    1.17 -/* Make Xen hypervisor call */
    1.18 -int xi_make_dom0_op(xi_handle *handle, dom0_op_t *op, int opcode)
    1.19 +/* Make simple xen version hypervisor calls */
    1.20 +static int xi_make_xen_version_hypercall(xi_handle *handle, long *vnum, xen_extraversion_t *ver)
    1.21 +{
    1.22 +	privcmd_hypercall_t privcmd;
    1.23 +	multicall_entry_t multicall[2];
    1.24 +	int ret = 0;
    1.25 +
    1.26 +	/* set up for doing hypercall */
    1.27 +	privcmd.op = __HYPERVISOR_multicall; 
    1.28 +	privcmd.arg[0] = (unsigned long)multicall;
    1.29 +	privcmd.arg[1] = 2;
    1.30 +
    1.31 +	/* first one to get xen version number */
    1.32 +	multicall[0].op = __HYPERVISOR_xen_version;
    1.33 +	multicall[0].args[0] = (unsigned long)XENVER_version;
    1.34 +
    1.35 +	/* second to get xen version flag */
    1.36 +	multicall[1].op = __HYPERVISOR_xen_version; 
    1.37 +	multicall[1].args[0] = (unsigned long)XENVER_extraversion;
    1.38 +	multicall[1].args[1] = (unsigned long)ver;
    1.39 +
    1.40 +	if (mlock( &privcmd, sizeof(privcmd_hypercall_t)) < 0) {
    1.41 +		perror("Failed to mlock privcmd structure");
    1.42 +		return -1;
    1.43 +	}
    1.44 +
    1.45 +	if (mlock( multicall, sizeof(multicall_entry_t)) < 0) {
    1.46 +		perror("Failed to mlock multicall_entry structure");
    1.47 +		munlock( &multicall, sizeof(multicall_entry_t));
    1.48 +		return -1;
    1.49 +	}
    1.50 +
    1.51 +	if (ioctl( handle->fd, IOCTL_PRIVCMD_HYPERCALL, &privcmd) < 0) {
    1.52 +		perror("Hypercall failed");
    1.53 +		ret = -1;
    1.54 +	}
    1.55 +
    1.56 +	*vnum = multicall[0].result;
    1.57 +
    1.58 +	munlock( &privcmd, sizeof(privcmd_hypercall_t));
    1.59 +	munlock( &multicall, sizeof(multicall_entry_t));
    1.60 +
    1.61 +	return ret;
    1.62 +}
    1.63 +
    1.64 +/* Make Xen Dom0 op hypervisor call */
    1.65 +static int xi_make_dom0_op(xi_handle *handle, dom0_op_t *dom_op, int dom_opcode)
    1.66  {
    1.67  	privcmd_hypercall_t privcmd;
    1.68  	int ret = 0;
    1.69  
    1.70  	/* set up for doing hypercall */
    1.71  	privcmd.op = __HYPERVISOR_dom0_op;
    1.72 -	privcmd.arg[0] = (unsigned long)op;
    1.73 -	op->cmd = opcode;
    1.74 -	op->interface_version = DOM0_INTERFACE_VERSION;
    1.75 +	privcmd.arg[0] = (unsigned long)dom_op;
    1.76 +	dom_op->cmd = dom_opcode;
    1.77 +	dom_op->interface_version = DOM0_INTERFACE_VERSION;
    1.78  
    1.79  	if (mlock( &privcmd, sizeof(privcmd_hypercall_t)) < 0) {
    1.80  		perror("Failed to mlock privcmd structure");
    1.81  		return -1;
    1.82  	}
    1.83  
    1.84 -	if (mlock( op, sizeof(dom0_op_t)) < 0) {
    1.85 +	if (mlock( dom_op, sizeof(dom0_op_t)) < 0) {
    1.86  		perror("Failed to mlock dom0_op structure");
    1.87  		munlock( &privcmd, sizeof(privcmd_hypercall_t));
    1.88  		return -1;
    1.89 @@ -85,7 +132,7 @@ int xi_make_dom0_op(xi_handle *handle, d
    1.90  	}
    1.91  
    1.92  	munlock( &privcmd, sizeof(privcmd_hypercall_t));
    1.93 -	munlock( op, sizeof(dom0_op_t));
    1.94 +	munlock( dom_op, sizeof(dom0_op_t));
    1.95  
    1.96  	return ret;
    1.97  }
    1.98 @@ -142,3 +189,16 @@ long long xi_get_vcpu_usage(xi_handle *h
    1.99  
   1.100  	return op.u.getvcpucontext.cpu_time;
   1.101  }
   1.102 +
   1.103 +/* gets xen version information from hypervisor */
   1.104 +int xi_get_xen_version(xi_handle *handle, long *vnum, xen_extraversion_t *ver) 
   1.105 +{
   1.106 +
   1.107 +        /* gets the XENVER_version and XENVER_extraversion */
   1.108 +	if (xi_make_xen_version_hypercall( handle, vnum, ver) < 0) {; 
   1.109 +		perror("XEN VERSION Hypercall failed");
   1.110 +		return -1;
   1.111 +	}
   1.112 +
   1.113 +	return 0;
   1.114 +}
     2.1 --- a/tools/xenstat/libxenstat/src/xen-interface.h	Mon Aug 22 23:07:37 2005 +0000
     2.2 +++ b/tools/xenstat/libxenstat/src/xen-interface.h	Tue Aug 23 18:25:51 2005 +0000
     2.3 @@ -27,6 +27,7 @@ typedef uint32_t u32;
     2.4  typedef uint64_t u64;
     2.5  
     2.6  #include "dom0_ops.h"
     2.7 +#include "version.h"
     2.8  
     2.9  /* Opaque handles */
    2.10  typedef struct xi_handle xi_handle;
    2.11 @@ -38,6 +39,9 @@ xi_handle *xi_init();
    2.12  /* Release the handle to libxc, free resources, etc. */
    2.13  void xi_uninit(xi_handle *handle);
    2.14  
    2.15 +/* Obtain xen version information from hypervisor */
    2.16 +int xi_get_xen_version(xi_handle *, long *vnum, xen_extraversion_t *ver);
    2.17 +
    2.18  /* Obtain physinfo data from dom0 */
    2.19  int xi_get_physinfo(xi_handle *, dom0_physinfo_t *);
    2.20  
     3.1 --- a/tools/xenstat/libxenstat/src/xenstat.c	Mon Aug 22 23:07:37 2005 +0000
     3.2 +++ b/tools/xenstat/libxenstat/src/xenstat.c	Tue Aug 23 18:25:51 2005 +0000
     3.3 @@ -22,6 +22,7 @@
     3.4  #include <unistd.h>
     3.5  #include <xen-interface.h>
     3.6  #include "xenstat.h"
     3.7 +#include "version.h"
     3.8  
     3.9  /*
    3.10   * Types
    3.11 @@ -32,6 +33,9 @@ struct xenstat_handle {
    3.12  	FILE *procnetdev;
    3.13  };
    3.14  
    3.15 +#define SHORT_ASC_LEN 5 		/* length of 65535 */
    3.16 +#define VERSION_SIZE (2 * SHORT_ASC_LEN + 1 + sizeof(xen_extraversion_t) + 1)
    3.17 +
    3.18  struct xenstat_node {
    3.19  	unsigned int flags;
    3.20  	unsigned long long cpu_hz;
    3.21 @@ -39,6 +43,7 @@ struct xenstat_node {
    3.22  	unsigned long long tot_mem;
    3.23  	unsigned long long free_mem;
    3.24  	unsigned int num_domains;
    3.25 +	char xen_version[VERSION_SIZE]; /* xen version running on this node */
    3.26  	xenstat_domain *domains;	/* Array of length num_domains */
    3.27  };
    3.28  
    3.29 @@ -47,7 +52,7 @@ struct xenstat_domain {
    3.30  	unsigned int state;
    3.31  	unsigned long long cpu_ns;
    3.32  	unsigned int num_vcpus;
    3.33 -	xenstat_vcpu *vcpus;	/* Array of length num_vcpus */
    3.34 +	xenstat_vcpu *vcpus;		/* Array of length num_vcpus */
    3.35  	unsigned long long cur_mem;	/* Current memory reservation */
    3.36  	unsigned long long max_mem;	/* Total memory allowed */
    3.37  	unsigned int ssid;
    3.38 @@ -164,6 +169,8 @@ xenstat_node *xenstat_get_node(xenstat_h
    3.39  #define DOMAIN_CHUNK_SIZE 256
    3.40  	xenstat_node *node;
    3.41  	dom0_physinfo_t physinfo;
    3.42 +	xen_extraversion_t version;
    3.43 +	long vnum = 0; 
    3.44  	dom0_getdomaininfo_t domaininfo[DOMAIN_CHUNK_SIZE];
    3.45  	unsigned int num_domains, new_domains;
    3.46  	unsigned int i;
    3.47 @@ -179,6 +186,14 @@ xenstat_node *xenstat_get_node(xenstat_h
    3.48  		return NULL;
    3.49  	}
    3.50  
    3.51 +	/* Get the xen version number and xen version tag */
    3.52 +	if (xi_get_xen_version(handle->xihandle, &vnum, &version) < 0) {
    3.53 +		free(node); 
    3.54 +		return NULL;
    3.55 +	} 
    3.56 +	snprintf(node->xen_version, VERSION_SIZE,
    3.57 +		"%ld.%ld%s\n", ((vnum >> 16) & 0xFFFF), vnum & 0xFFFF, (char *)version); 
    3.58 +
    3.59  	node->cpu_hz = ((unsigned long long)physinfo.cpu_khz) * 1000ULL;
    3.60  	node->num_cpus =
    3.61  	    (physinfo.threads_per_core * physinfo.cores_per_socket *
    3.62 @@ -247,8 +262,8 @@ xenstat_node *xenstat_get_node(xenstat_h
    3.63  			if(collectors[i].collect(handle, node) == 0) {
    3.64  				xenstat_free_node(node);
    3.65  				return NULL;
    3.66 -                        }
    3.67 -                }
    3.68 +			}
    3.69 +		}
    3.70  	}
    3.71  
    3.72  	return node;
    3.73 @@ -291,6 +306,11 @@ xenstat_domain *xenstat_node_domain_by_i
    3.74  	return NULL;
    3.75  }
    3.76  
    3.77 +const char *xenstat_node_xen_ver(xenstat_node * node)
    3.78 +{
    3.79 +	return node->xen_version;
    3.80 +}
    3.81 +
    3.82  unsigned long long xenstat_node_tot_mem(xenstat_node * node)
    3.83  {
    3.84  	return node->tot_mem;
    3.85 @@ -505,7 +525,7 @@ static int xenstat_collect_networks(xens
    3.86  		unsigned int domid;
    3.87  		int ret = fscanf(handle->procnetdev,
    3.88  				 "vif%u.%u:%llu%llu%llu%llu%*u%*u%*u%*u"
    3.89 -				 "%llu%llu%llu%llu%*u%*u%*u%*u",
    3.90 +				 "%llu%llu%llu%llu%*u%*u%*u%*u\n",
    3.91  				 &domid, &net.id,
    3.92  				 &net.tbytes, &net.tpackets, &net.terrs,
    3.93  				 &net.tdrop,
     4.1 --- a/tools/xenstat/libxenstat/src/xenstat.h	Mon Aug 22 23:07:37 2005 +0000
     4.2 +++ b/tools/xenstat/libxenstat/src/xenstat.h	Tue Aug 23 18:25:51 2005 +0000
     4.3 @@ -51,6 +51,8 @@ xenstat_domain *xenstat_node_domain(xens
     4.4  /* Get the domain with the given index; used to loop over all domains. */
     4.5  xenstat_domain *xenstat_node_domain_by_index(xenstat_node * node,
     4.6  					     unsigned index);
     4.7 +/* Get xen version of the node */
     4.8 +const char *xenstat_node_xen_ver(xenstat_node * node);
     4.9  
    4.10  /* Get amount of total memory on a node */
    4.11  unsigned long long xenstat_node_tot_mem(xenstat_node * node);
     5.1 --- a/tools/xenstat/xentop/xentop.1	Mon Aug 22 23:07:37 2005 +0000
     5.2 +++ b/tools/xenstat/xentop/xentop.1	Tue Aug 23 18:25:51 2005 +0000
     5.3 @@ -40,7 +40,7 @@ display help and exit
     5.4  output version information and exit
     5.5  .TP
     5.6  \fB\-d\fR, \fB\-\-delay\fR=\fISECONDS\fR
     5.7 -seconds between updates (default 1)
     5.8 +seconds between updates (default 3)
     5.9  .TP
    5.10  \fB\-n\fR, \fB\-\-networks\fR
    5.11  output network information
     6.1 --- a/tools/xenstat/xentop/xentop.c	Mon Aug 22 23:07:37 2005 +0000
     6.2 +++ b/tools/xenstat/xentop/xentop.c	Tue Aug 23 18:25:51 2005 +0000
     6.3 @@ -151,7 +151,7 @@ xenstat_node *prev_node = NULL;
     6.4  xenstat_node *cur_node = NULL;
     6.5  field_id sort_field = FIELD_DOMID;
     6.6  unsigned int first_domain_index = 0;
     6.7 -unsigned int delay = 1;
     6.8 +unsigned int delay = 3;
     6.9  int show_vcpus = 0;
    6.10  int show_networks = 0;
    6.11  int repeat_header = 0;
    6.12 @@ -174,7 +174,7 @@ static void usage(const char *program)
    6.13  	       "Displays ongoing information about xen vm resources \n\n"
    6.14  	       "-h, --help           display this help and exit\n"
    6.15  	       "-V, --version        output version information and exit\n"
    6.16 -	       "-d, --delay=SECONDS  seconds between updates (default 1)\n"
    6.17 +	       "-d, --delay=SECONDS  seconds between updates (default 3)\n"
    6.18  	       "-n, --networks       output vif network data\n"
    6.19  	       "-r, --repeat-header  repeat table header before each domain\n"
    6.20  	       "-v, --vcpus          output vcpu data\n"
    6.21 @@ -254,7 +254,7 @@ static void attr_addstr(int attr, const 
    6.22  static void set_delay(char *value)
    6.23  {
    6.24  	int new_delay;
    6.25 -	new_delay = atoi(prompt_val);
    6.26 +	new_delay = atoi(value);
    6.27  	if(new_delay > 0)
    6.28  		delay = new_delay;
    6.29  }