Class VMHost
java.lang.Object
javaforce.vm.VMHost
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclean_stats(int days) Delete old stats from all VMs.static booleanTests connecting to remote host.static longcpu_load()static longstatic booleanget_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.static Stringstatic long
-
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- = yearmonth- = month (1-12)day- = day of monthhour- = 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
Tests connecting to remote host.- Parameters:
remote- = remote host
-
getHostname
-