protected long getMemory() { OperatingSystemMXBean osmxb = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean(); return osmxb.getTotalPhysicalMemorySize(); }
protected String getOsType() { String osName = System.getProperty("os.name"); if (osName.startsWith("Linux")) return "Linux"; if (osName.startsWith("Windows")) return "Windows"; if ((osName.contains("SunOS")) || (osName.contains("Solaris"))) return "Solaris"; if (osName.contains("Mac")) return "Mac"; if (osName.contains("FreeBSD")) { return "FreeBSD"; } return "Other"; }