Package javaforce.vm

Class VMHost

java.lang.Object
javaforce.vm.VMHost

public class VMHost extends Object
  • Constructor Details

    • VMHost

      public VMHost()
  • Method Details

    • total_memory

      public static long total_memory()
    • free_memory

      public static long free_memory()
    • cpu_load

      public static long cpu_load()
    • get_all_stats

      public static boolean get_all_stats(int year, int month, int day, int hour, int sample)
      This function will collect stats for all running VMs and save to local file system. Interval should be every 20 seconds (4320 per day) (180 per hour) Stats are saved to /var/jfkvm/stats/{vm-uuid}/{cpu,memory,disk,network}-yyyy-mm-dd-hh.stat
      Parameters:
      year - = year
      month - = month (1-12)
      day - = day of month
      hour - = hour (24)
      sample - = (0-180)
    • clean_stats

      public static void clean_stats(int days)
      Delete old stats from all VMs. Call once a day.
      Parameters:
      days - = # of days to keep stats
    • connect

      public static boolean connect(String remote)
      Tests connecting to remote host.
      Parameters:
      remote - = remote host
    • getHostname

      public static String getHostname()