本文整理了Java中org.elasticsearch.action.admin.cluster.node.stats.NodeStats.getJvm()
方法的一些代码示例,展示了NodeStats.getJvm()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NodeStats.getJvm()
方法的具体详情如下:
包路径:org.elasticsearch.action.admin.cluster.node.stats.NodeStats
类名称:NodeStats
方法名:getJvm
[英]JVM level statistics.
[中]JVM级别的统计信息。
代码示例来源:origin: SonarSource/sonarqube
public static void toProtobuf(NodeStats stats, ProtobufSystemInfo.Section.Builder protobuf) {
setAttribute(protobuf, "CPU Usage (%)", stats.getProcess().getCpu().getPercent());
setAttribute(protobuf, "Disk Available", byteCountToDisplaySize(stats.getFs().getTotal().getAvailable().getBytes()));
setAttribute(protobuf, "Store Size", byteCountToDisplaySize(stats.getIndices().getStore().getSizeInBytes()));
setAttribute(protobuf, "Open File Descriptors", stats.getProcess().getOpenFileDescriptors());
setAttribute(protobuf, "Max File Descriptors", stats.getProcess().getMaxFileDescriptors());
setAttribute(protobuf, "Spinning", stats.getFs().getTotal().getSpins());
setAttribute(protobuf, "JVM Heap Usage", formatPercent(stats.getJvm().getMem().getHeapUsedPercent()));
setAttribute(protobuf, "JVM Heap Used", byteCountToDisplaySize(stats.getJvm().getMem().getHeapUsed().getBytes()));
setAttribute(protobuf, "JVM Heap Max", byteCountToDisplaySize(stats.getJvm().getMem().getHeapMax().getBytes()));
setAttribute(protobuf, "JVM Non Heap Used", byteCountToDisplaySize(stats.getJvm().getMem().getNonHeapUsed().getBytes()));
setAttribute(protobuf, "JVM Threads", stats.getJvm().getThreads().getCount());
setAttribute(protobuf, "Field Data Memory", byteCountToDisplaySize(stats.getIndices().getFieldData().getMemorySizeInBytes()));
setAttribute(protobuf, "Field Data Circuit Breaker Limit", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.FIELDDATA).getLimit()));
setAttribute(protobuf, "Field Data Circuit Breaker Estimation", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.FIELDDATA).getEstimated()));
setAttribute(protobuf, "Request Circuit Breaker Limit", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.REQUEST).getLimit()));
setAttribute(protobuf, "Request Circuit Breaker Estimation", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.REQUEST).getEstimated()));
setAttribute(protobuf, "Query Cache Memory", byteCountToDisplaySize(stats.getIndices().getQueryCache().getMemorySizeInBytes()));
setAttribute(protobuf, "Request Cache Memory", byteCountToDisplaySize(stats.getIndices().getRequestCache().getMemorySizeInBytes()));
}
代码示例来源:origin: org.elasticsearch/elasticsearch
org.elasticsearch.monitor.jvm.JvmStats js = nodeStats.getJvm();
if (js == null) {
continue;
代码示例来源:origin: org.elasticsearch/elasticsearch
getProcess().toXContent(builder, params);
if (getJvm() != null) {
getJvm().toXContent(builder, params);
代码示例来源:origin: pinterest/soundwave
private void logNodeStats(Map<String, NodeStats> statsMap) {
Map<String, String> tags = new HashMap<>();
for (NodeStats stat : statsMap.values()) {
tags.put("esnode", stat.getHostname());
Stats.setGauge(StatsUtil.getStatsName("eshealth", "heapUsedPercent", tags),
stat.getJvm().getMem().getHeapUsedPrecent());
Stats.setGauge(StatsUtil.getStatsName("eshealth", "heapMaxMB", tags),
stat.getJvm().getMem().getHeapMax().getMbFrac());
Stats.setGauge(StatsUtil.getStatsName("eshealth", "heapUsedMB", tags),
stat.getJvm().getMem().getHeapUsed().getMbFrac());
Stats.setGauge(StatsUtil.getStatsName("eshealth", "upMinutes", tags),
stat.getJvm().getUptime().getMinutesFrac());
Stats.setGauge(StatsUtil.getStatsName("eshealth", "docCount", tags),
stat.getIndices().getDocs().getCount());
}
}
代码示例来源:origin: org.elasticsearch/elasticsearch
JvmStats jvmStats = stats == null ? null : stats.getJvm();
FsInfo fsInfo = stats == null ? null : stats.getFs();
OsStats osStats = stats == null ? null : stats.getOs();
代码示例来源:origin: org.graylog.plugins/usage-statistics
if (stats.getJvm() != null) {
garbageCollectors = Lists.newArrayList();
for (JvmStats.GarbageCollector gc : stats.getJvm().getGc()) {
garbageCollectors.add(gc.getName());
代码示例来源:origin: harbby/presto-connectors
public void addNodeInfoStats(NodeInfo nodeInfo, NodeStats nodeStats) {
versions.addTo(new JvmVersion(nodeInfo.getJvm()), 1);
org.elasticsearch.monitor.jvm.JvmStats js = nodeStats.getJvm();
if (js == null) {
return;
}
if (js.getThreads() != null) {
threads += js.getThreads().getCount();
}
maxUptime = Math.max(maxUptime, js.getUptime().millis());
if (js.getMem() != null) {
heapUsed += js.getMem().getHeapUsed().bytes();
heapMax += js.getMem().getHeapMax().bytes();
}
}
代码示例来源:origin: spinscale/elasticsearch-graphite-plugin
private void sendNodeStats() {
sendNodeFsStats(nodeStats.getFs());
sendNodeHttpStats(nodeStats.getHttp());
sendNodeJvmStats(nodeStats.getJvm());
sendNodeNetworkStats(nodeStats.getNetwork());
sendNodeOsStats(nodeStats.getOs());
sendNodeProcessStats(nodeStats.getProcess());
sendNodeTransportStats(nodeStats.getTransport());
sendNodeThreadPoolStats(nodeStats.getThreadPool());
}
代码示例来源:origin: apache/servicemix-bundles
org.elasticsearch.monitor.jvm.JvmStats js = nodeStats.getJvm();
if (js == null) {
continue;
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
org.elasticsearch.monitor.jvm.JvmStats js = nodeStats.getJvm();
if (js == null) {
continue;
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
org.elasticsearch.monitor.jvm.JvmStats js = nodeStats.getJvm();
if (js == null) {
continue;
代码示例来源:origin: harbby/presto-connectors
getProcess().toXContent(builder, params);
if (getJvm() != null) {
getJvm().toXContent(builder, params);
代码示例来源:origin: sirensolutions/siren-join
public void memStatus() throws IOException {
NodeStats[] nodeStats = client.admin().cluster().prepareNodesStats()
.setJvm(true).setIndices(true).setTransport(true)
.execute().actionGet().getNodes();
log("==== MEMORY ====");
log("Committed heap size: [0]=" + nodeStats[0].getJvm().getMem().getHeapCommitted() + ", [1]=" + nodeStats[1].getJvm().getMem().getHeapCommitted());
log("Used heap size: [0]=" + nodeStats[0].getJvm().getMem().getHeapUsed() + ", [1]=" + nodeStats[1].getJvm().getMem().getHeapUsed());
log("FieldData cache size: [0]=" + nodeStats[0].getIndices().getFieldData().getMemorySize() + ", [1]=" + nodeStats[1].getIndices().getFieldData().getMemorySize());
log("Query cache size: [0]=" + nodeStats[0].getIndices().getQueryCache().getMemorySize() + ", [1]=" + nodeStats[1].getIndices().getQueryCache().getMemorySize());
log("");
log("==== NETWORK ====");
log("Transport: [0]=" + nodeStats[0].getTransport().toXContent(jsonBuilder(), ToXContent.EMPTY_PARAMS).string() + ", [1]=" + nodeStats[1].getTransport().toXContent(jsonBuilder(), ToXContent.EMPTY_PARAMS).string());
log("");
}
代码示例来源:origin: org.sonarsource.sonarqube/sonar-server
public static void toProtobuf(NodeStats stats, ProtobufSystemInfo.Section.Builder protobuf) {
setAttribute(protobuf, "CPU Usage (%)", stats.getProcess().getCpu().getPercent());
setAttribute(protobuf, "Disk Available", byteCountToDisplaySize(stats.getFs().getTotal().getAvailable().getBytes()));
setAttribute(protobuf, "Store Size", byteCountToDisplaySize(stats.getIndices().getStore().getSizeInBytes()));
setAttribute(protobuf, "Open File Descriptors", stats.getProcess().getOpenFileDescriptors());
setAttribute(protobuf, "Max File Descriptors", stats.getProcess().getMaxFileDescriptors());
setAttribute(protobuf, "Spinning", stats.getFs().getTotal().getSpins());
setAttribute(protobuf, "JVM Heap Usage", formatPercent(stats.getJvm().getMem().getHeapUsedPercent()));
setAttribute(protobuf, "JVM Heap Used", byteCountToDisplaySize(stats.getJvm().getMem().getHeapUsed().getBytes()));
setAttribute(protobuf, "JVM Heap Max", byteCountToDisplaySize(stats.getJvm().getMem().getHeapMax().getBytes()));
setAttribute(protobuf, "JVM Non Heap Used", byteCountToDisplaySize(stats.getJvm().getMem().getNonHeapUsed().getBytes()));
setAttribute(protobuf, "JVM Threads", stats.getJvm().getThreads().getCount());
setAttribute(protobuf, "Field Data Memory", byteCountToDisplaySize(stats.getIndices().getFieldData().getMemorySizeInBytes()));
setAttribute(protobuf, "Field Data Circuit Breaker Limit", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.FIELDDATA).getLimit()));
setAttribute(protobuf, "Field Data Circuit Breaker Estimation", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.FIELDDATA).getEstimated()));
setAttribute(protobuf, "Request Circuit Breaker Limit", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.REQUEST).getLimit()));
setAttribute(protobuf, "Request Circuit Breaker Estimation", byteCountToDisplaySize(stats.getBreaker().getStats(CircuitBreaker.REQUEST).getEstimated()));
setAttribute(protobuf, "Query Cache Memory", byteCountToDisplaySize(stats.getIndices().getQueryCache().getMemorySizeInBytes()));
setAttribute(protobuf, "Request Cache Memory", byteCountToDisplaySize(stats.getIndices().getRequestCache().getMemorySizeInBytes()));
}
代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch
getProcess().toXContent(builder, params);
if (getJvm() != null) {
getJvm().toXContent(builder, params);
代码示例来源:origin: sirensolutions/siren-join
public void memStatus() throws IOException {
NodeStats[] nodeStats = client.admin().cluster().prepareNodesStats()
.setJvm(true).setIndices(true).setTransport(true)
.execute().actionGet().getNodes();
log("==== MEMORY ====");
log("Committed heap size: [0]=" + nodeStats[0].getJvm().getMem().getHeapCommitted() + ", [1]=" + nodeStats[1].getJvm().getMem().getHeapCommitted());
log("Used heap size: [0]=" + nodeStats[0].getJvm().getMem().getHeapUsed() + ", [1]=" + nodeStats[1].getJvm().getMem().getHeapUsed());
log("FieldData cache size: [0]=" + nodeStats[0].getIndices().getFieldData().getMemorySize() + ", [1]=" + nodeStats[1].getIndices().getFieldData().getMemorySize());
log("Query cache size: [0]=" + nodeStats[0].getIndices().getQueryCache().getMemorySize() + ", [1]=" + nodeStats[1].getIndices().getQueryCache().getMemorySize());
log("");
log("==== NETWORK ====");
log("Transport: [0]=" + nodeStats[0].getTransport().toXContent(jsonBuilder(), ToXContent.EMPTY_PARAMS).string() + ", [1]=" + nodeStats[1].getTransport().toXContent(jsonBuilder(), ToXContent.EMPTY_PARAMS).string());
log("");
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch
getProcess().toXContent(builder, params);
if (getJvm() != null) {
getJvm().toXContent(builder, params);
代码示例来源:origin: apache/servicemix-bundles
getProcess().toXContent(builder, params);
if (getJvm() != null) {
getJvm().toXContent(builder, params);
代码示例来源:origin: com.netflix.raigad/raigad
return;
jvmStats = ndStat.getJvm();
if (jvmStats == null) {
logger.info("JvmStats is null,hence returning (No JvmStats).");
代码示例来源:origin: apache/servicemix-bundles
JvmStats jvmStats = stats == null ? null : stats.getJvm();
FsInfo fsInfo = stats == null ? null : stats.getFs();
OsStats osStats = stats == null ? null : stats.getOs();
内容来源于网络,如有侵权,请联系作者删除!