hbase-webapps.regionserver.processRS.jsp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbase-server Show documentation
Show all versions of hbase-server Show documentation
Server functionality for HBase
<%--
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
--%>
<%@ page contentType="text/html;charset=UTF-8"
import="java.util.Date"
import="java.util.List"
import="javax.management.ObjectName"
import="java.lang.management.ManagementFactory"
import="java.lang.management.MemoryPoolMXBean"
import="java.lang.management.RuntimeMXBean"
import="java.lang.management.GarbageCollectorMXBean"
import="org.apache.hadoop.hbase.util.JSONMetricUtil"
import="org.apache.hadoop.hbase.procedure2.util.StringUtils"
import="org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix"
%>
<%
RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
ObjectName jvmMetrics = new ObjectName("Hadoop:service=HBase,name=JvmMetrics");
ObjectName rsMetrics = new ObjectName("Hadoop:service=HBase,name=RegionServer,sub=Server");
// There is always two of GC collectors
List gcBeans = JSONMetricUtil.getGcCollectorBeans();
GarbageCollectorMXBean collector1 = null;
GarbageCollectorMXBean collector2 = null;
try {
collector1 = gcBeans.get(0);
collector2 = gcBeans.get(1);
} catch(IndexOutOfBoundsException e) {}
List mPools = JSONMetricUtil.getMemoryPools();
pageContext.setAttribute("pageTitle", "Process info for PID: " + JSONMetricUtil.getProcessPID());
%>
<%= JSONMetricUtil.getCommmand().split(" ")[0] %>
Started
Uptime
PID
JvmPauseMonitor Count
Owner
<%= new Date(runtimeBean.getStartTime()) %>
<%= StringUtils.humanTimeDiff(runtimeBean.getUptime()) %>
<%= JSONMetricUtil.getProcessPID() %>
<%= (long)JSONMetricUtil.getValueFromMBean(rsMetrics, "pauseWarnThresholdExceeded")
+ (long)JSONMetricUtil.getValueFromMBean(rsMetrics, "pauseInfoThresholdExceeded") %>
<%= runtimeBean.getSystemProperties().get("user.name") %>
Threads
ThreadsNew
ThreadsRunable
ThreadsBlocked
ThreadsWaiting
ThreadsTimeWaiting
ThreadsTerminated
<%= JSONMetricUtil.getValueFromMBean(jvmMetrics, "ThreadsNew") %>
<%= JSONMetricUtil.getValueFromMBean(jvmMetrics, "ThreadsRunnable")%>
<%= JSONMetricUtil.getValueFromMBean(jvmMetrics, "ThreadsBlocked")%>
<%= JSONMetricUtil.getValueFromMBean(jvmMetrics, "ThreadsWaiting")%>
<%= JSONMetricUtil.getValueFromMBean(jvmMetrics, "ThreadsTimedWaiting")%>
<%= JSONMetricUtil.getValueFromMBean(jvmMetrics, "ThreadsTerminated")%>
GC Collectors
<% if (gcBeans.size() == 2) { %>
Collection Count
Collection Time
Last duration
<%= collector1.getCollectionCount() %>
<%= StringUtils.humanTimeDiff(collector1.getCollectionTime()) %>
<%= StringUtils.humanTimeDiff(JSONMetricUtil.getLastGcDuration(
collector1.getObjectName())) %>
Collection Count
Collection Time
Last duration
<%= collector2.getCollectionCount() %>
<%= StringUtils.humanTimeDiff(collector2.getCollectionTime()) %>
<%= StringUtils.humanTimeDiff(JSONMetricUtil.getLastGcDuration(
collector2.getObjectName())) %>
<%} else { %>
Can not display GC Collector stats.
<%} %>
Total GC Collection time: <%= StringUtils.humanTimeDiff(collector1.getCollectionTime() +
collector2.getCollectionTime())%>
<% for(MemoryPoolMXBean mp:mPools) {
if(mp.getName().contains("Cache")) continue;%>
<%= mp.getName() %>
Commited
Init
Max
Used
Utilization [%]
<%= TraditionalBinaryPrefix.long2String(mp.getUsage().getCommitted(), "B", 1) %>
<%= TraditionalBinaryPrefix.long2String(mp.getUsage().getInit(), "B", 1) %>
<%= TraditionalBinaryPrefix.long2String(mp.getUsage().getMax(), "B", 1) %>
<%= TraditionalBinaryPrefix.long2String(mp.getUsage().getUsed(), "B", 1) %>
<%= JSONMetricUtil.calcPercentage(mp.getUsage().getUsed(),
mp.getUsage().getCommitted()) %>
<% } %>