Examples of MonitorProvider


Examples of models.monitor.MonitorProvider

 
 
  @Override
  public void doJob() throws Exception {
    models.utils.LogUtils.printLogNormal("Logging JVM Stats");
    MonitorProvider mp = MonitorProvider.getInstance();
    PerformUsage perf = mp.getJVMMemoryUsage();
   
    // get disk usage
    mp.getFreeDiskspace();
   
    log.info(perf.toString());
    if(perf.memoryUsagePercent >= THRESHOLD_PERCENT) {
      log.info("========= Live Threads List=============");
      log.info(mp.getThreadUsage().toString());
      log.info("========================================");
      log.info("========================JVM Thread Dump====================");
      ThreadInfo[] threadDump = mp.getThreadDump();
      for(ThreadInfo threadInfo : threadDump) {
        log.info(threadInfo.toString());
      }
      log.info("===========================================================");
    }
View Full Code Here

Examples of models.monitor.MonitorProvider

       //do stuff
      //ConfUtils.updateServerInstancePrefix();
      AgentDataProvider adp = AgentDataProvider.getInstance();
      adp.updateConfigFromAllFiles();
     
      MonitorProvider mp= MonitorProvider.getInstance();
      mp.getJVMMemoryUsage();
      mp.getFreeDiskspace();
     
    }   
View Full Code Here

Examples of models.monitor.MonitorProvider

   
    int totalCommandCountInAgentCommandMetadatas = adp
        .getTotalCommandCountInAgentCommandMetadatas();
   
    int runningJobCount = ActorConfig.runningJobCount.get();
    MonitorProvider mp= MonitorProvider.getInstance();
    PerformUsage performaUsage = mp.currentJvmPerformUsage;
    DiskUsage diskUsage = mp.currentDiskUsage;
     

    HashMap<String, String> metricMap = new HashMap<String, String>();
View Full Code Here

Examples of org.nasutekds.server.api.MonitorProvider

   */
  @Test()
  public void testInitialization()
         throws Exception
  {
    MonitorProvider monitorProvider = getMonitorInstance();
    assertNotNull(monitorProvider);
  }
View Full Code Here

Examples of org.nasutekds.server.api.MonitorProvider

   * @param  lowerName  The name of the monitor provider to deregister, in all
   *                    lowercase characters.
   */
  public static void deregisterMonitorProvider(String lowerName)
  {
    MonitorProvider provider =
         directoryServer.monitorProviders.remove(toLowerCase(lowerName));


    // Try to deregister the monitor provider as an MBean.
    if (provider != null)
View Full Code Here

Examples of org.nasutekds.server.api.MonitorProvider

  {
    ResultCode        resultCode          = ResultCode.SUCCESS;
    boolean           adminActionRequired = false;
    ArrayList<Message> messages            = new ArrayList<Message>();

    MonitorProvider monitor = monitors.remove(configuration.dn());
    if (monitor != null)
    {
      String lowerName = toLowerCase(monitor.getMonitorInstanceName());
      DirectoryServer.deregisterMonitorProvider(lowerName);
      monitor.finalizeMonitorProvider();
    }

    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
  }
View Full Code Here

Examples of org.nasutekds.server.api.MonitorProvider

    boolean           adminActionRequired = false;
    ArrayList<Message> messages            = new ArrayList<Message>();


    // Get the existing monitor provider if it's already enabled.
    MonitorProvider existingMonitor = monitors.get(configuration.dn());


    // If the new configuration has the monitor disabled, then disable it if it
    // is enabled, or do nothing if it's already disabled.
    if (! configuration.isEnabled())
    {
      if (existingMonitor != null)
      {
        String lowerName =
             toLowerCase(existingMonitor.getMonitorInstanceName());
        DirectoryServer.deregisterMonitorProvider(lowerName);

        MonitorProvider monitor = monitors.remove(configuration.dn());
        if (monitor != null)
        {
          monitor.finalizeMonitorProvider();
        }
      }

      return new ConfigChangeResult(resultCode, adminActionRequired, messages);
    }
View Full Code Here

Examples of org.nasutekds.server.api.MonitorProvider

           MonitorProviderCfgDefn.getInstance();
      ClassPropertyDefinition propertyDefinition =
           definition.getJavaClassPropertyDefinition();
      Class<? extends MonitorProvider> providerClass =
           propertyDefinition.loadClass(className, MonitorProvider.class);
      MonitorProvider monitor = providerClass.newInstance();

      if (configuration != null)
      {
        Method method = monitor.getClass().getMethod(
            "initializeMonitorProvider", configuration.configurationClass());
        method.invoke(monitor, configuration);
      }

      return (MonitorProvider<? extends MonitorProviderCfg>) monitor;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.