From: <jt...@hy...> - 2007-11-20 00:19:20
|
Author: jtravis Date: 2007-11-19 16:19:17 -0800 (Mon, 19 Nov 2007) New Revision: 6860 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=6860 Modified: trunk/ui_plugins/health/app/HealthController.groovy trunk/ui_plugins/health/etc/health_i18n.properties trunk/ui_plugins/health/views/health/index.gsp Log: Remove excessive logging, add metricsPerMinute in load tab Modified: trunk/ui_plugins/health/app/HealthController.groovy =================================================================== --- trunk/ui_plugins/health/app/HealthController.groovy 2007-11-20 00:13:14 UTC (rev 6859) +++ trunk/ui_plugins/health/app/HealthController.groovy 2007-11-20 00:19:17 UTC (rev 6860) @@ -1,3 +1,4 @@ +import org.hyperic.hq.measurement.server.session.DerivedMeasurementManagerEJBImpl as DMM import org.hyperic.util.PrintfFormat import org.hyperic.util.units.UnitsFormat import org.hyperic.util.units.UnitsConstants @@ -18,9 +19,6 @@ extends BaseController { def HealthController() { - /* - SELECT COUNT(m.template_id) AS total, m.coll_interval/60000 AS coll_interval, t.name AS name, mt.name AS type FROM EAM_MEASUREMENT m, EAM_MEASUREMENT_TEMPL t, EAM_MONITORABLE_TYPE mt WHERE m.template_id = t.id and t.monitorable_type_id=mt.id and m.coll_interval > 0 and m.enabled =$P{SQL_BOOLEAN_TRUE} GROUP BY m.template_id, t.name, mt.name, m.coll_interval ORDER BY total DESC - */ addBeforeFilter({ if (!user.isSuperUser()) { render(inline: "Unauthorized") @@ -92,9 +90,20 @@ def index(params) { render(locals:[ diags: DiagnosticThread.diagnosticObjects, - cacheSchema: cacheSchema ]) + cacheSchema: cacheSchema, + metricsPerMinute: metricsPerMinute]) } + private getMetricsPerMinute() { + def vals = DMM.one.findMetricCountSummaries() + def total = 0.0 + + for (v in vals) { + total = total + (float)v.total / (float)v.interval + } + (int)total + } + def getDiag(params) { def diagName = params.getOne('diag') for (d in DiagnosticThread.diagnosticObjects) { @@ -135,8 +144,6 @@ } catch(Exception e) { } - log.info "ProcCPU = ${procCpu}" - return [sysUserCpu: (int)(cpu.user * 100), sysSysCpu: (int)(cpu.sys * 100), sysNiceCpu: (int)(cpu.nice * 100), Modified: trunk/ui_plugins/health/etc/health_i18n.properties =================================================================== --- trunk/ui_plugins/health/etc/health_i18n.properties 2007-11-20 00:13:14 UTC (rev 6859) +++ trunk/ui_plugins/health/etc/health_i18n.properties 2007-11-20 00:19:17 UTC (rev 6860) @@ -32,5 +32,4 @@ jvmFreeMem=Free jvmMaxMem=Max Allocation jvmPercMem=% Used - - +metricsPerMinute=# Metrics collected per minute \ No newline at end of file Modified: trunk/ui_plugins/health/views/health/index.gsp =================================================================== --- trunk/ui_plugins/health/views/health/index.gsp 2007-11-20 00:13:14 UTC (rev 6859) +++ trunk/ui_plugins/health/views/health/index.gsp 2007-11-20 00:19:17 UTC (rev 6860) @@ -230,5 +230,9 @@ schema:cacheSchema, numRows:500, pageControls:false) %> </div> + <div dojoType="ContentPane" label="Load"> + ${l.metricsPerMinute}: ${metricsPerMinute} + </div> + </div> </div> |