#ifndef _ZENTIFIC_GUEST_H #define _ZENTIFIC_GUEST_H #include "defines.h" #include "common.h" #include "types.h" #include "node.h" #include "net.h" #include "disk.h" #include "vbd.h" #include "zlist.h" #include "vcpu.h" guest *new_guest(void); void free_guest(guest *vm); char *get_domain_name(unsigned int domain_id); char *get_vnc_port(unsigned int domain_id); char *get_vnc_passwd(unsigned int domain_id); char *get_vm_type(char *uuid); char *get_os_type(char *uuid); char *get_kernel(char *uuid); char *get_ramdisk(char *uuid); char *get_kernel_cmdline(char *uuid); char *get_poweroff_action(char *uuid); char *get_crash_action(char *uuid); char *get_reboot_action(char *uuid); int get_uptime(char *uuid); int vm_exists(char *uuid, unsigned int domid); /* * - domain is marked as blocked only if all its vcpus are blocked * - domain is marked as running if any of its vcpus is running */ char *get_state(xc_dominfo_t info); #define DOMAIN_CHUNK_SIZE 256 zlist *populate_vms(host *thisnode, int xc_handle); /*time for brief sleeps between cpu measurements, in microseconds *-very good, experimentally determined using a while loop and cpulimit * #define TIME_INTERVAL 250000 *-original * #define TIME_INTERVAL 50000 *-works well, takes too long * #define TIME_INTERVAL 500000 */ #define TIME_INTERVAL 250000 #endif /* _ZENTIFIC_GUEST_H */