public JVMStatistics getJVMStatistics() throws RemoteException { return JVMHelper.getStatistics(); }
@Override public JVMDetails getJVMDetails() { return JVMHelper.getDetails(); }
private static JVMDetailsProbe initJVMDetailsProbe() { String detailsProbeClass = System.getProperty("gs.admin.jvm.probe.details"); if (detailsProbeClass != null) return tryCreateInstance(detailsProbeClass); try { JVMDetailsProbe result = new SigarJVMDetailsProbe(); result.probeDetails(); return result; } catch (Throwable t) { LogHelper.log(_loggerName, Level.FINE, "Trying to load sigar failed", t); // ignore, no sigar } try { JVMDetailsProbe result = new JMXJVMDetailsProbe(); result.probeDetails(); return result; } catch (Throwable t) { LogHelper.log(_loggerName, Level.FINE, "Trying to load sigar failed", t); // ignore, no sigar } return null; }
public LookupDiscoveryManager( String[] groups, LookupLocator[] locators, DiscoveryListener listener, Configuration config, boolean runningWithinRegistrar) throws IOException, ConfigurationException { // GS-10816 This must be called outside of the LogManager lock (meaning before RollingFileHandler() is invoked) // The LookupDiscoveryManager is the first code that is executed by the Admin / SpaceProxy // before a call to any logger. JVMHelper.initStaticCotr(); beginDiscovery(groups, locators, listener, config); dynamicLocatorDisc = new DynamicLookupLocatorDiscovery(this, runningWithinRegistrar); }
private static JVMStatisticsProbe initJVMStatisticsProbe() { String statisticsProbeClass = System.getProperty("gs.admin.jvm.probe.statistics"); if (statisticsProbeClass != null) return tryCreateInstance(statisticsProbeClass); try { JVMStatisticsProbe result = new SigarJVMStatisticsProbe(); result.probeStatistics(); return result; } catch (Throwable t) { LogHelper.log(_loggerName, Level.FINE, "Trying to load sigar failed", t); // ignore, no sigar } try { JVMStatisticsProbe result = new JMXJVMStatisticsProbe(); result.probeStatistics(); return result; } catch (Throwable t) { LogHelper.log(_loggerName, Level.FINE, "Trying to load JMX failed", t); // ignore, no sigar } return null; }
@Override public JVMStatistics getJVMStatistics() { return JVMHelper.getStatistics(); }
public JVMDetails getJVMDetails() throws RemoteException { return JVMHelper.getDetails(); }
@Override public void run() { RmiLoaderHandlerCleaner loaderHandlerCleaner = new RmiLoaderHandlerCleaner(); JVMStatistics jvmStats = JVMHelper.getStatistics(); while (!Thread.currentThread().isInterrupted()) { try { Thread.sleep(scheduledSystemBootTime); } catch (InterruptedException e) { break; } JVMStatistics newStats = JVMHelper.getStatistics(); long collectionTime = newStats.getGcCollectionTime() - jvmStats.getGcCollectionTime(); if (collectionTime > gcCollectionWarning) { logger.warning("Long GC collection occurred, took [" + collectionTime + "ms], breached threshold [" + gcCollectionWarning + "]"); } jvmStats = newStats; if (loadCleanerEnabled) { loaderHandlerCleaner.clean(); } exitIfHasAgentAndAgentIsNotRunning(); } } };