congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HostPerf
Code IndexAdd Tabnine to your IDE (free)

How to use
HostPerf
in
scouter.agent.counter.task

Best Java code snippets using scouter.agent.counter.task.HostPerf (Showing top 4 results out of 315)

origin: scouter-project/scouter

@Counter
public void process(CounterBasket pw) {
  try {
    if (Configure.getInstance().counter_netstat_enabled) {
      netstat();
    }
    domain(pw);
  } catch (Exception e) {
    Logger.println("A140", 10, "HostPerf", e);
  }
}
origin: scouter-project/scouter

private void alertMem(Mem m) {
  Configure conf = Configure.getInstance();
  if(conf.mem_alert_enabled==false)
    return;
  
  long fmem = m.getActualFree();
  float memrate = (float) m.getUsedPercent();
  long now = System.currentTimeMillis();
  if (memrate >= conf.mem_fatal_pct) {
    if (now >= mem_last_fatal + conf.mem_alert_interval_ms) {
      DataProxy.sendAlert(AlertLevel.FATAL, "FATAL_MEMORY_HIGH", "fatal mem usage free=" + prt(fmem)
          + " rate=" + memrate + "%", null);
      mem_last_fatal = now;
    }
    return;
  }
  if (memrate >= conf.mem_warning_pct) {
    if (now >= mem_last_warning + conf.mem_alert_interval_ms) {
      DataProxy.sendAlert(AlertLevel.WARN, "WARNING_MEMORY_HIGH", "warning mem usage free=" + prt(fmem)
          + " rate=" + memrate + "%", null);
      mem_last_warning = now;
    }
    return;
  }
}
origin: scouter-project/scouter

userCpu = (float) userCpuMeter.getAvg(conf._cpu_value_avg_sec);
alertCpu(cpu);
alertMem(m);
origin: scouter-project/scouter

      .append(FormatUtil.print(total / 1024.0 / 1024, "#0.0#")).append("GB.. available=").append(prt(avail * 1024));
} else if (pct >= conf.disk_warning_pct && warn.length() < 32756) {
  long avail = usage.getAvail();
      .append(FormatUtil.print(total / 1024.0 / 1024, "#0.0#")).append("GB.. available=").append(prt(avail * 1024));
scouter.agent.counter.taskHostPerf

Most used methods

  • alertCpu
  • alertMem
  • domain
  • netstat
  • prt

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • getSystemService (Context)
  • startActivity (Activity)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • BoxLayout (javax.swing)
  • JFrame (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now