298 lines
12 KiB
Text
298 lines
12 KiB
Text
<!DOCTYPE html>
|
|
<!-- stats.jsp convertita da Bootstrap 3 a Bootstrap 5 -->
|
|
<html lang="it">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>Acxent - Statistiche 1.0.0</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<!-- Bootstrap 5 -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<!-- Font Awesome 6 -->
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet">
|
|
<!-- AdminLTE 4 -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/admin-lte@4.0.0/dist/css/adminlte.min.css">
|
|
|
|
|
|
<style>
|
|
body {
|
|
font-size: 0.675rem;
|
|
line-height: 1.2;
|
|
}
|
|
.table td, .table th {
|
|
padding: 0.25rem;
|
|
}
|
|
.card-body, {
|
|
padding: 0.2rem;
|
|
}
|
|
h1, h2, h3, h4, h5, h6 {
|
|
margin-top: 0.5rem;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
/*********************************
|
|
msgStatus sulla toolbar in alto
|
|
**********************************/
|
|
.headerMsgStatus {
|
|
font-size: 0.675rem;
|
|
color: darkgreen;
|
|
font-style: italic;
|
|
flex-grow: 1; /* Occupa tutto lo spazio disponibile */
|
|
max-height: 200px; /* Altezza massima, regolabile a piacere */
|
|
overflow-y: auto; /* Abilita lo scroll verticale se necessario */
|
|
/*white-space: nowrap; /* Evita che il contenuto vada a capo */
|
|
/*display: flex;*/
|
|
align-items: center; /* Allinea il testo verticalmente */
|
|
padding: 0 2px; /* Aggiunge un po' di spazio interno */
|
|
/*border-radius: 4px; /* Bordi arrotondati, opzionale */
|
|
/*background-color: #f8f9fa; /* Colore di sfondo leggero, opzionale */
|
|
/*border: 1px solid #dee2e6; /* Bordo leggero, opzionale */
|
|
}
|
|
.headerMsgStatus.smart {
|
|
padding: 2px 20px; /* Aggiunge un po' di spazio interno */
|
|
}
|
|
.headerMsgStatus:empty {
|
|
display: none !important;
|
|
}
|
|
</style>
|
|
<jsp:useBean id="msg" class="java.lang.String" type="java.lang.String" scope="request" />
|
|
|
|
<jsp:useBean id="stats" scope="request" class="it.acxent.servlet.AcServletStats" type="it.acxent.servlet.AcServletStats" />
|
|
|
|
<jsp:useBean id="cPools" class="it.acxent.util.Vectumerator" type="it.acxent.util.Vectumerator" scope="request" />
|
|
|
|
</head>
|
|
<body class="hold-transition layout-top-nav">
|
|
<div class="wrapper">
|
|
<header class="main-header">
|
|
<nav class="navbar navbar-expand-lg" style="background-color: blue;">
|
|
<div class="container"> <a href="https://www.acxent.it" class="navbar-brand fw-bold">Acxent S.r.l.</a> <span class="d-none d-sm-block ms-auto">Stats 1.0.0</span> </div>
|
|
</nav>
|
|
</header>
|
|
<div class="content-wrapper">
|
|
<div class="container py-3">
|
|
<section class="content-header">
|
|
<h1 class="h5">Web Application Stats</h1>
|
|
</section>
|
|
<section class="content">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<!-- Parte sinistra: informazioni base -->
|
|
<div class="col-md-6">
|
|
<table class="table table-bordered table-hover mb-0">
|
|
<tbody>
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th colspan="2"><strong>Core: Version: <%= it.acxent.db.DBAdapter.getVersion() %></strong></th>
|
|
</tr></thead>
|
|
<tr>
|
|
<td><strong>Start time:</strong></td>
|
|
<td><%= stats.getStartTime() %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Current time:</strong></td>
|
|
<td><%= stats.getCurrentTime() %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Uptime:</strong></td>
|
|
<td><%= stats.getUptime() %></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Parte destra: dettagli memoria -->
|
|
<div class="col-md-6"> <%= stats.getMemory() %> </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col-lg-3"><a class="btn btn-primary w-100" href="javascript:refresh();">Refresh</a></div>
|
|
<div class="col-lg-3"><a class="btn btn-primary w-100" href="javascript:gc();">Garbage Collection</a></div>
|
|
<div class="col-lg-3"><a class="btn btn-primary w-100" href="javascript:ru();">Reset used connection</a></div>
|
|
<div class="col-lg-3"><a class="btn btn-primary w-100" href="javascript:rh();">Reset all hashtables</a></div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header text-center bg-secondary text-white"> <strong>Status</strong> </div>
|
|
<div class="card-body ">
|
|
<div class="headerMsgStatus d-none d-md-block" id="statusMsg"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header text-center bg-secondary text-white"> <strong>Hit WebApp</strong> </div>
|
|
<div class="card-body table-responsive">
|
|
<table class="table table-bordered table-hover table-striped">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>WebApp</th>
|
|
<th>N. Hits</th>
|
|
<th>Hits/min</th>
|
|
<th>Last <%=it.acxent.servlet.AcServletStats.RUNTIME_HITS%><br>
|
|
Hits/min</th>
|
|
<th>MAX Last <%=it.acxent.servlet.AcServletStats.RUNTIME_HITS%><br>
|
|
Hits/min</th>
|
|
<th>Last <%=it.acxent.servlet.AcServletStats.RUNTIME_HITS%><br>
|
|
Hits/min Timestamp</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%
|
|
it.acxent.servlet.AcServletContextInfo sci;
|
|
java.util.Enumeration enu = stats.getScInfo();
|
|
while (enu.hasMoreElements()) {
|
|
sci = (it.acxent.servlet.AcServletContextInfo) enu.nextElement();
|
|
%>
|
|
<tr>
|
|
<td><%= sci.getName() %></td>
|
|
<td><%= sci.getTotalHits() %></td>
|
|
<td><%= sci.getHitsMinute(stats.getUptimeMinute()) %></td>
|
|
<td><%= sci.getHitsMinuteRT() %></td>
|
|
<td><%= sci.getHitsMinuteRTMax() %></td>
|
|
<td><%= sci.getHitsMinuteRTMaxTmst() %></td>
|
|
</tr>
|
|
<% } %>
|
|
<tr class="table-secondary">
|
|
<td><strong>TOTALS</strong></td>
|
|
<td><strong><%= stats.getTotalHits() %></strong></td>
|
|
<td><strong><%= stats.getTotalHitsMean() %></strong></td>
|
|
<td><strong><%= stats.getTotalHitsMeanRT() %></strong></td>
|
|
<td><strong><%= stats.getTotalHitsMeanRTMax() %></strong></td>
|
|
<td><strong><%= stats.getTotalHitsMeanRTMaxTmst() %></strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="6"><% if (!msg.isEmpty()) { %>
|
|
<div class="alert alert-warning alert-dismissible fade show" role="alert"> <%= msg %>
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
<% } %></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header text-center bg-secondary text-white"> <strong>Connection Pools Stats</strong> </div>
|
|
<div class="card-body table-responsive">
|
|
<table class="table table-bordered table-hover table-striped">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>DB</th>
|
|
<th><span class="text-success fw-bold">free</span></th>
|
|
<th>Tot</th>
|
|
<th><span class="text-danger fw-bold">used</span></th>
|
|
<th>init</th>
|
|
<th>max</th>
|
|
<th>timeout</th>
|
|
<th>life time</th>
|
|
<th>Max Hits<br>
|
|
(total hits)</th>
|
|
<th>F/U#Con.Numb. Conn. Uptime Timestamp → hits<br>
|
|
<small>For full stack trace pls. set debug level to DEBUG (5) or INFO1 (1)</small></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%
|
|
it.acxent.db.ConnectionPool cp;
|
|
while (stats.getCPools().hasMoreElements()) {
|
|
cp = (it.acxent.db.ConnectionPool) stats.getCPools().nextElement();
|
|
%>
|
|
<tr>
|
|
<td><%= cp.getAp().getDatabase() %></td>
|
|
<td><span class="text-success fw-bold"><%= cp.getFreeCons() %></span></td>
|
|
<td><%= cp.getTotCons() %></td>
|
|
<td><span class="text-danger fw-bold"><%= cp.getUsedCons() %></span></td>
|
|
<td><%= cp.getAp().getInitialCons() %></td>
|
|
<td><%= cp.getAp().getMaxCons() %></td>
|
|
<td><%= cp.getAp().getTimeout() %></td>
|
|
<td><%= cp.getAp().getConnectionLifeTime() %></td>
|
|
<td><%= cp.getAp().getMaxConnectionHits() %><br>
|
|
(<%= cp.getAp().getTotalHits() %>)</td>
|
|
<td><%= cp.getAp().getConnectionsCreateTs() %></td>
|
|
</tr>
|
|
<% } %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<form name="menu" method="post">
|
|
<input name="cmd" type="hidden" value="acxent-status">
|
|
<input type="hidden" name="act">
|
|
<input type="hidden" name="wa">
|
|
<input type="hidden" name="waName">
|
|
</form>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
<footer class="main-footer mt-auto py-3 bg-light">
|
|
<div class="container text-center"> <strong>Copyright © 2025 <a href="https://www.acxent.it">Acxent S.r.l.</a></strong> </div>
|
|
</footer>
|
|
</div>
|
|
|
|
<!-- Bootstrap 5 Bundle + Popper -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
<!-- AdminLTE 4 -->
|
|
<script src="https://cdn.jsdelivr.net/npm/admin-lte@4.0.0/dist/js/adminlte.min.js"></script>
|
|
<script src="https://face.f3ct.net/admin/_V4/_lte/plugins/jQuery/jquery-3.7.1.min.js"></script>
|
|
<script src="https://face.f3ct.net/admin/_V4/_js/_acxent.js"></script>
|
|
<script type="text/javascript">
|
|
function refresh() {
|
|
var f = document.menu;
|
|
f.act.value = "";
|
|
f.wa.value = "";
|
|
f.waName.value = "";
|
|
f.submit();
|
|
}
|
|
function gc() {
|
|
var f = document.menu;
|
|
f.act.value = "gc";
|
|
f.wa.value = "";
|
|
f.waName.value = "";
|
|
f.submit();
|
|
}
|
|
function rh() {
|
|
if(confirm("Le Hash table verranno resettate. Sei sicuro?")) {
|
|
var f = document.menu;
|
|
f.act.value = "rh";
|
|
f.wa.value = "";
|
|
f.waName.value = "";
|
|
f.submit();
|
|
}
|
|
}
|
|
function ru() {
|
|
if(confirm("Le connessioni usate verranno resettate. Sei sicuro?")) {
|
|
var f = document.menu;
|
|
f.act.value = "ru";
|
|
f.wa.value = "";
|
|
f.waName.value = "";
|
|
f.submit();
|
|
}
|
|
}
|
|
function rhO(key, name) {
|
|
var f = document.menu;
|
|
f.act.value = "ro";
|
|
f.wa.value = key;
|
|
f.waName.value = name;
|
|
f.submit();
|
|
}
|
|
$(document).ready(function () {
|
|
console.log("init startAggiornaStatusMsg!");
|
|
Ab.startAggiornaStatusMsg();
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|