You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
(927) |
Apr
(419) |
May
(352) |
Jun
(431) |
Jul
(463) |
Aug
(345) |
Sep
(304) |
Oct
(596) |
Nov
(466) |
Dec
(414) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(348) |
Feb
(313) |
Mar
(665) |
Apr
(688) |
May
(434) |
Jun
(311) |
Jul
(540) |
Aug
(554) |
Sep
(467) |
Oct
(341) |
Nov
(365) |
Dec
(272) |
2009 |
Jan
(386) |
Feb
(293) |
Mar
(279) |
Apr
(239) |
May
(229) |
Jun
(199) |
Jul
(186) |
Aug
(111) |
Sep
(196) |
Oct
(146) |
Nov
(116) |
Dec
(140) |
2010 |
Jan
(170) |
Feb
(159) |
Mar
(151) |
Apr
(161) |
May
(90) |
Jun
(56) |
Jul
(28) |
Aug
(22) |
Sep
(5) |
Oct
|
Nov
(23) |
Dec
(12) |
2011 |
Jan
(8) |
Feb
(8) |
Mar
(22) |
Apr
(24) |
May
(4) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dcr...@hy...> - 2010-04-05 17:10:43
|
Author: dcrutchf Date: 2010-04-05 10:10:34 -0700 (Mon, 05 Apr 2010) New Revision: 14474 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14474 Modified: trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseSysmonCollector.java Log: Updating code based on code review feedback Modified: trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseSysmonCollector.java =================================================================== --- trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseSysmonCollector.java 2010-04-05 07:56:02 UTC (rev 14473) +++ trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseSysmonCollector.java 2010-04-05 17:10:34 UTC (rev 14474) @@ -43,14 +43,9 @@ pass = props.getProperty(JDBCMeasurementPlugin.PROP_PASSWORD, ""); try { - Connection conn = createConnection(url, user, pass); + conn = createConnection(url, user, pass); } catch(SQLException e) { - throw new PluginException(new MetricUnreachableException("Could not connect using information provided", e)); - } finally { - if (conn != null) { - DBUtil.closeJDBCObjects(log, conn, null, null); - conn = null; - } + throw new PluginException("Create connection failed:" + e.getMessage(), e); } super.init(); |
From: <bo...@hy...> - 2010-04-05 07:56:10
|
Author: bob Date: 2010-04-05 00:56:02 -0700 (Mon, 05 Apr 2010) New Revision: 14473 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14473 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1399 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-04-04 07:51:17 UTC (rev 14472) +++ trunk/etc/version.properties 2010-04-05 07:56:02 UTC (rev 14473) @@ -1,3 +1,3 @@ -#Sun Apr 04 00:17:06 PDT 2010 +#Mon Apr 05 00:19:39 PDT 2010 version=4.3.0 -build=1398 +build=1399 |
From: <bo...@hy...> - 2010-04-04 07:51:27
|
Author: bob Date: 2010-04-04 00:51:17 -0700 (Sun, 04 Apr 2010) New Revision: 14472 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14472 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1398 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-04-03 07:49:37 UTC (rev 14471) +++ trunk/etc/version.properties 2010-04-04 07:51:17 UTC (rev 14472) @@ -1,3 +1,3 @@ -#Sat Apr 03 00:16:57 PDT 2010 +#Sun Apr 04 00:17:06 PDT 2010 version=4.3.0 -build=1397 +build=1398 |
From: <bo...@hy...> - 2010-04-03 07:49:45
|
Author: bob Date: 2010-04-03 00:49:37 -0700 (Sat, 03 Apr 2010) New Revision: 14471 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14471 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1397 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-04-02 23:23:22 UTC (rev 14470) +++ trunk/etc/version.properties 2010-04-03 07:49:37 UTC (rev 14471) @@ -1,3 +1,3 @@ -#Fri Apr 02 00:16:40 PDT 2010 +#Sat Apr 03 00:16:57 PDT 2010 version=4.3.0 -build=1396 +build=1397 |
From: KenChen <ke...@sy...> - 2010-04-03 07:38:32
|
Sorry, the result of "java -jar sigar.jar iostat" is not what I want, and it is not the same as the result of "iostat -x" I commanded on linux. |
From: KenChen <ke...@sy...> - 2010-04-03 07:38:29
|
Hi, I'm new of sigar library. It's a great library for who is responsible for system management. Now I'm facing a problem, I don't know how to get Disk read/write blocks per seconds like I command "iostat -x" on unix-like system. Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util cciss/c0d0 0.89 13.65 2.39 7.42 192.62 168.66 96.31 84.33 36.81 0.33 33.24 5.73 5.62 cciss/c0d1 0.02 0.00 0.00 0.00 0.20 0.00 0.10 0.00 176.89 0.00 6.73 0.66 0.00 Does any one can help me to find a way on it ? Thank you ~~ |
From: <sc...@hy...> - 2010-04-02 23:23:31
|
Author: scottmf Date: 2010-04-02 16:23:22 -0700 (Fri, 02 Apr 2010) New Revision: 14470 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14470 Modified: trunk/src/org/hyperic/hq/ui/action/resource/platform/autodiscovery/NewAutoDiscoveryAction.java Log: added null check Modified: trunk/src/org/hyperic/hq/ui/action/resource/platform/autodiscovery/NewAutoDiscoveryAction.java =================================================================== --- trunk/src/org/hyperic/hq/ui/action/resource/platform/autodiscovery/NewAutoDiscoveryAction.java 2010-04-02 22:24:26 UTC (rev 14469) +++ trunk/src/org/hyperic/hq/ui/action/resource/platform/autodiscovery/NewAutoDiscoveryAction.java 2010-04-02 23:23:22 UTC (rev 14470) @@ -84,6 +84,10 @@ PlatformAutoDiscoveryForm newForm = (PlatformAutoDiscoveryForm) form; Integer platformId = newForm.getRid(); + if (platformId == null) { + RequestUtils.setError(request, Constants.ERR_PLATFORM_NOT_FOUND); + return returnFailure(request, mapping); + } Integer platformType = newForm.getType(); HashMap forwardParams = new HashMap(3); |
From: <rm...@hy...> - 2010-04-02 22:24:36
|
Author: rmorgan Date: 2010-04-02 15:24:26 -0700 (Fri, 02 Apr 2010) New Revision: 14469 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14469 Modified: trunk/src/org/hyperic/hq/measurement/galerts/MeasurementGtrigger.java trunk/src/org/hyperic/hq/measurement/server/session/MeasurementTemplate.java Log: [HQ-2098] Use MeasurementTemplate to format values rather than print the raw value. Modified: trunk/src/org/hyperic/hq/measurement/galerts/MeasurementGtrigger.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/galerts/MeasurementGtrigger.java 2010-04-02 14:39:19 UTC (rev 14468) +++ trunk/src/org/hyperic/hq/measurement/galerts/MeasurementGtrigger.java 2010-04-02 22:24:26 UTC (rev 14469) @@ -55,6 +55,7 @@ import org.hyperic.hq.measurement.server.session.Measurement; import org.hyperic.hq.measurement.server.session.MeasurementManagerEJBImpl; import org.hyperic.hq.measurement.server.session.MeasurementScheduleZevent; +import org.hyperic.hq.measurement.server.session.MeasurementTemplate; import org.hyperic.hq.measurement.server.session.MeasurementZevent; import org.hyperic.hq.measurement.server.session.TemplateManagerEJBImpl; import org.hyperic.hq.measurement.server.session.MeasurementScheduleZevent.MeasurementScheduleZeventSource; @@ -636,7 +637,10 @@ setNotFired(); return; } - + + TemplateManagerLocal tMan = TemplateManagerEJBImpl.getOne(); + MeasurementTemplate template = tMan.getTemplate(_templateId); + StringBuffer sr = new StringBuffer(); StringBuffer lr = new StringBuffer(); @@ -648,7 +652,7 @@ .append(" ") .append(_comparator) .append(" ") - .append(_metricVal); + .append(template.formatValue(_metricVal.doubleValue())); lr.append(_sizeCompare) .append(" ") @@ -660,7 +664,7 @@ .append(" ") .append(_comparator) .append(" ") - .append(_metricVal); + .append(template.formatValue(_metricVal.doubleValue())); long nonReportingResourceFiredTime = getAlertFiredTime(startTime, endTime); @@ -722,7 +726,8 @@ descr = descrNoVal+"Unknown"; timestamp = nonReportingResourceFiredTime; } else { - descr = descrNoVal+val.getValue(); + String formattedValue = metric.getTemplate().formatValue(val); + descr = descrNoVal + formattedValue; timestamp = val.getTimestamp(); } Modified: trunk/src/org/hyperic/hq/measurement/server/session/MeasurementTemplate.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/MeasurementTemplate.java 2010-04-02 14:39:19 UTC (rev 14468) +++ trunk/src/org/hyperic/hq/measurement/server/session/MeasurementTemplate.java 2010-04-02 22:24:26 UTC (rev 14469) @@ -207,7 +207,14 @@ if (val == null) return ""; - FormattedNumber th = UnitsConvert.convert(val.getValue(), getUnits()); + return formatValue(val.getValue()); + } + + /** + * Format a metric values, based on the unites specified by this template. + */ + public String formatValue(double val) { + FormattedNumber th = UnitsConvert.convert(val, getUnits()); return th.toString(); } } |
From: Doug M. <do...@hy...> - 2010-04-02 20:59:46
|
The sigar API gives you the total # of read and write in bytes: R-bytes -> rkB/s W-bytes -> wkB/s Your program would need to calculate the rate itself. |
From: Doug M. <do...@hy...> - 2010-04-02 18:54:54
|
Sure, try: java -jar sigar.jar iostat The source for that command is at: src/org/hyperic/sigar/cmd/Iostat.java |
From: Doug M. <do...@hy...> - 2010-04-02 18:53:17
|
The svn trunk is a mirror of our git master branch, which will become the 1.7.0 stable version. I would like to get a 1.7.0 release out soon-ish, so just let me know what changes you need and we can make it happen. Is there not a Debian bug/ticket open somewhere with more detail? |
From: <dcr...@hy...> - 2010-04-02 14:39:29
|
Author: dcrutchf Date: 2010-04-02 07:39:19 -0700 (Fri, 02 Apr 2010) New Revision: 14468 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14468 Modified: trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseSysmonCollector.java Log: [HHQ-3791] - UI does not validate Sybase connection settings within Configuration Properties Modified: trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseSysmonCollector.java =================================================================== --- trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseSysmonCollector.java 2010-04-02 07:52:16 UTC (rev 14467) +++ trunk/plugins/sybase/src/org/hyperic/hq/plugin/sybase/SybaseSysmonCollector.java 2010-04-02 14:39:19 UTC (rev 14468) @@ -19,7 +19,9 @@ import org.hyperic.hq.product.CollectorResult; import org.hyperic.hq.product.JDBCMeasurementPlugin; import org.hyperic.hq.product.Metric; +import org.hyperic.hq.product.MetricUnreachableException; import org.hyperic.hq.product.MetricValue; +import org.hyperic.hq.product.PluginException; import org.hyperic.util.jdbc.DBUtil; /** @@ -33,6 +35,27 @@ private CallableStatement stmt; private Connection conn = null; + protected void init() throws PluginException { + Properties props = getProperties(); + + String url = props.getProperty(JDBCMeasurementPlugin.PROP_URL, ""), + user = props.getProperty(JDBCMeasurementPlugin.PROP_USER, ""), + pass = props.getProperty(JDBCMeasurementPlugin.PROP_PASSWORD, ""); + + try { + Connection conn = createConnection(url, user, pass); + } catch(SQLException e) { + throw new PluginException(new MetricUnreachableException("Could not connect using information provided", e)); + } finally { + if (conn != null) { + DBUtil.closeJDBCObjects(log, conn, null, null); + conn = null; + } + } + + super.init(); + } + public void collect() { Properties props = getProperties(); |
From: <bo...@hy...> - 2010-04-02 07:52:26
|
Author: bob Date: 2010-04-02 00:52:16 -0700 (Fri, 02 Apr 2010) New Revision: 14467 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14467 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1396 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-04-02 04:54:36 UTC (rev 14466) +++ trunk/etc/version.properties 2010-04-02 07:52:16 UTC (rev 14467) @@ -1,3 +1,3 @@ -#Thu Apr 01 00:17:59 PDT 2010 +#Fri Apr 02 00:16:40 PDT 2010 version=4.3.0 -build=1395 +build=1396 |
From: <pn...@hy...> - 2010-04-02 04:54:46
|
Author: pnguyen Date: 2010-04-01 21:54:36 -0700 (Thu, 01 Apr 2010) New Revision: 14466 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14466 Modified: trunk/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java trunk/src/org/hyperic/hq/appdef/server/session/ConfigResponseDAO.java trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java Log: [HHQ-3706] Use get() instead of findById() to minimize ObjectNotFoundException Modified: trunk/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java 2010-04-02 00:07:28 UTC (rev 14465) +++ trunk/src/org/hyperic/hq/appdef/server/session/ConfigManagerEJBImpl.java 2010-04-02 04:54:36 UTC (rev 14466) @@ -124,7 +124,7 @@ private ConfigResponseDB getConfigResponse(ConfigResponseDAO dao, AppdefEntityID id) { - ConfigResponseDB config; + ConfigResponseDB config = null; switch(id.getType()){ case AppdefEntityConstants.APPDEF_TYPE_PLATFORM: @@ -138,11 +138,18 @@ break; case AppdefEntityConstants.APPDEF_TYPE_APPLICATION: default: - throw new IllegalArgumentException("The passed entity type " + - "does not support config " + + throw new IllegalArgumentException("The resource[ " + id + + "] does not support config " + "responses"); } + // Platforms, servers, and services should have a config response record. + // A null config response could indicate that the resource has been deleted. + if (config == null) { + throw new IllegalArgumentException( + "No config response found for resource[" + id + "]"); + } + return config; } Modified: trunk/src/org/hyperic/hq/appdef/server/session/ConfigResponseDAO.java =================================================================== --- trunk/src/org/hyperic/hq/appdef/server/session/ConfigResponseDAO.java 2010-04-02 00:07:28 UTC (rev 14465) +++ trunk/src/org/hyperic/hq/appdef/server/session/ConfigResponseDAO.java 2010-04-02 04:54:36 UTC (rev 14466) @@ -80,20 +80,20 @@ ConfigResponseDB findByPlatformId(Integer id) { PlatformDAO dao = new PlatformDAO(getFactory()); - Platform plat = dao.findById(id); - return plat.getConfigResponse(); + Platform plat = dao.get(id); + return (plat == null ? null : plat.getConfigResponse()); } public ConfigResponseDB findByServerId(Integer id) { ServerDAO dao = new ServerDAO(getFactory()); - Server server = dao.findById(id); - return server.getConfigResponse(); + Server server = dao.get(id); + return (server == null ? null : server.getConfigResponse()); } public ConfigResponseDB findByServiceId(Integer id) { ServiceDAO dao = new ServiceDAO(getFactory()); - Service service = dao.findById(id); - return service.getConfigResponse(); + Service service = dao.get(id); + return (service == null ? null : service.getConfigResponse()); } /** Modified: trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java 2010-04-02 00:07:28 UTC (rev 14465) +++ trunk/src/org/hyperic/hq/bizapp/server/session/AppdefBossEJBImpl.java 2010-04-02 04:54:36 UTC (rev 14466) @@ -1581,7 +1581,9 @@ getMergedConfigResponse(subject, ProductPlugin.TYPE_MEASUREMENT, id, true); - } catch (Exception e) { + } catch (Throwable t) { + log.debug("Unable to get config response: " + t.getMessage(), t); + // If anything goes wrong getting the config, just move // along. The plugins will be removed on the next agent // restart. |
From: <pn...@hy...> - 2010-04-02 00:07:36
|
Author: pnguyen Date: 2010-04-01 17:07:28 -0700 (Thu, 01 Apr 2010) New Revision: 14465 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14465 Modified: trunk/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java trunk/src/org/hyperic/hq/ui/action/resource/common/monitor/visibility/IndicatorChartsAction.java Log: [HHQ-3803] Init total to 0, not 1. Added comment to consolidate code in the future. Modified: trunk/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java 2010-04-02 00:06:18 UTC (rev 14464) +++ trunk/src/org/hyperic/hq/measurement/server/session/DataManagerEJBImpl.java 2010-04-02 00:07:28 UTC (rev 14465) @@ -1240,9 +1240,9 @@ if (historicalData.size() == 0) { return null; } - double high = Double.MIN_VALUE, - low = Double.MAX_VALUE, - total = 1; + double high = Double.MIN_VALUE; + double low = Double.MAX_VALUE; + double total = 0; Double lastVal = null; int count = 0; long last = Long.MIN_VALUE; Modified: trunk/src/org/hyperic/hq/ui/action/resource/common/monitor/visibility/IndicatorChartsAction.java =================================================================== --- trunk/src/org/hyperic/hq/ui/action/resource/common/monitor/visibility/IndicatorChartsAction.java 2010-04-02 00:06:18 UTC (rev 14464) +++ trunk/src/org/hyperic/hq/ui/action/resource/common/monitor/visibility/IndicatorChartsAction.java 2010-04-02 00:07:28 UTC (rev 14465) @@ -171,6 +171,11 @@ return result; } + /** + * TODO: The logic here is similar to DataManagerEJBImpl.getAggData(). + * Need to consolidate the code. + * + */ private double[] getAggregateData(MeasurementTemplate template, List<HighLowMetricValue> metricData) { final boolean debug = log.isDebugEnabled(); |
From: <sc...@hy...> - 2010-04-02 00:06:27
|
Author: scottmf Date: 2010-04-01 17:06:18 -0700 (Thu, 01 Apr 2010) New Revision: 14464 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14464 Modified: trunk/src/org/hyperic/hq/autoinventory/server/session/AutoinventoryManagerEJBImpl.java Log: [HHQ-3859] change this log from debug to info due to its importance Modified: trunk/src/org/hyperic/hq/autoinventory/server/session/AutoinventoryManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/autoinventory/server/session/AutoinventoryManagerEJBImpl.java 2010-04-01 23:08:00 UTC (rev 14463) +++ trunk/src/org/hyperic/hq/autoinventory/server/session/AutoinventoryManagerEJBImpl.java 2010-04-02 00:06:18 UTC (rev 14464) @@ -1032,7 +1032,7 @@ Collection dirties = statDAO.findDirtyStatus(); List res = new ArrayList(dirties.size()); - _log.debug("Found " + dirties.size() + " agents with " + + _log.info("Found " + dirties.size() + " agents with " + "serviceDirty = true"); for (Iterator i=dirties.iterator(); i.hasNext(); ) { |
From: <sc...@hy...> - 2010-04-01 23:08:08
|
Author: scottmf Date: 2010-04-01 16:08:00 -0700 (Thu, 01 Apr 2010) New Revision: 14463 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14463 Modified: trunk/src/org/hyperic/hq/product/server/mbean/ProductPluginDeployer.java trunk/src/org/hyperic/util/stats/ConcurrentStatsCollector.java Log: [HHQ-3782] added new stats to agent schedule mechanism Modified: trunk/src/org/hyperic/hq/product/server/mbean/ProductPluginDeployer.java =================================================================== --- trunk/src/org/hyperic/hq/product/server/mbean/ProductPluginDeployer.java 2010-04-01 23:02:58 UTC (rev 14462) +++ trunk/src/org/hyperic/hq/product/server/mbean/ProductPluginDeployer.java 2010-04-01 23:08:00 UTC (rev 14463) @@ -282,6 +282,8 @@ c.register(ConcurrentStatsCollector.EVENT_PROCESSING_TIME); c.register(ConcurrentStatsCollector.TRIGGER_INIT_TIME); c.register(ConcurrentStatsCollector.FIRED_ALERT_TIME); + c.register(ConcurrentStatsCollector.SCHEDULE_QUEUE_SIZE); + c.register(ConcurrentStatsCollector.UNSCHEDULE_QUEUE_SIZE); c.startCollector(); } catch (Exception e) { _log.error("Could not start Concurrent Stats Collector", e); Modified: trunk/src/org/hyperic/util/stats/ConcurrentStatsCollector.java =================================================================== --- trunk/src/org/hyperic/util/stats/ConcurrentStatsCollector.java 2010-04-01 23:02:58 UTC (rev 14462) +++ trunk/src/org/hyperic/util/stats/ConcurrentStatsCollector.java 2010-04-01 23:08:00 UTC (rev 14463) @@ -109,7 +109,9 @@ SEND_ALERT_TIME = "SEND_ALERT_TIME", ZEVENT_QUEUE_SIZE = "ZEVENT_QUEUE_SIZE", TRIGGER_INIT_TIME = "TRIGGER_INIT_TIME", - FIRED_ALERT_TIME = "FIRED_ALERT_TIME"; + FIRED_ALERT_TIME = "FIRED_ALERT_TIME", + SCHEDULE_QUEUE_SIZE = "SCHEDULE_QUEUE_SIZE", + UNSCHEDULE_QUEUE_SIZE = "UNSCHEDULE_QUEUE_SIZE"; // using tree due to ordering capabilities private final Map _statKeys = new TreeMap(); private AtomicBoolean _hasStarted = new AtomicBoolean(false); |
From: <sc...@hy...> - 2010-04-01 23:03:06
|
Author: scottmf Date: 2010-04-01 16:02:58 -0700 (Thu, 01 Apr 2010) New Revision: 14462 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14462 Modified: trunk/src/org/hyperic/hq/measurement/server/session/AgentScheduleSynchronizer.java trunk/src/org/hyperic/hq/measurement/server/session/MeasurementProcessorEJBImpl.java Log: [HHQ-3782] throttle back the AgentSchedule mechanism to avoid duplicate schedule requests and so that multiple workers can schedule metrics to agents in parallel Modified: trunk/src/org/hyperic/hq/measurement/server/session/AgentScheduleSynchronizer.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/AgentScheduleSynchronizer.java 2010-04-01 22:28:33 UTC (rev 14461) +++ trunk/src/org/hyperic/hq/measurement/server/session/AgentScheduleSynchronizer.java 2010-04-01 23:02:58 UTC (rev 14462) @@ -27,20 +27,37 @@ import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.Map.Entry; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.ScheduledThreadPoolExecutor; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.hyperic.hq.measurement.MeasurementUnscheduleException; +import org.hyperic.hq.agent.AgentConnectionException; +import org.hyperic.hq.appdef.Agent; +import org.hyperic.hq.appdef.server.session.AgentManagerEJBImpl; +import org.hyperic.hq.appdef.shared.AgentManagerLocal; +import org.hyperic.hq.appdef.shared.AgentNotFoundException; +import org.hyperic.hq.appdef.shared.AppdefEntityID; +import org.hyperic.hq.authz.server.session.AuthzSubject; +import org.hyperic.hq.authz.server.session.AuthzSubjectManagerEJBImpl; +import org.hyperic.hq.hibernate.SessionManager; +import org.hyperic.hq.hibernate.SessionManager.SessionRunner; import org.hyperic.hq.measurement.shared.MeasurementProcessorLocal; import org.hyperic.hq.zevents.Zevent; import org.hyperic.hq.zevents.ZeventListener; import org.hyperic.hq.zevents.ZeventManager; +import org.hyperic.util.stats.ConcurrentStatsCollector; /** * This class is used to schedule and unschedule metrics for a given entity. @@ -49,6 +66,18 @@ public class AgentScheduleSynchronizer { private static final Log _log = LogFactory.getLog(AgentScheduleSynchronizer.class.getName()); + private static final int NUM_WORKERS = 4; + private final ScheduledThreadPoolExecutor _executor; + private final List _workers = new ArrayList(NUM_WORKERS); + /** {@link Map} of {@link Integer}=AgentId to {@link Collection} of {@link AppdefEntityID}s */ + private final Map _scheduleAeids = new HashMap(); + /** {@link Map} of {@link Integer}=AgentId to {@link Collection} of {@link AppdefEntityID}s */ + private final Map _unscheduleAeids = new HashMap(); + private final Set _activeAgents = Collections.synchronizedSet(new HashSet()); + private final ConcurrentStatsCollector _stats = ConcurrentStatsCollector.getInstance(); + private final String SCHEDULE_QUEUE_SIZE = ConcurrentStatsCollector.SCHEDULE_QUEUE_SIZE; + private final String UNSCHEDULE_QUEUE_SIZE = ConcurrentStatsCollector.UNSCHEDULE_QUEUE_SIZE; + private ScheduledFuture _schedule; private static AgentScheduleSynchronizer SINGLETON = new AgentScheduleSynchronizer(); @@ -56,10 +85,120 @@ return AgentScheduleSynchronizer.SINGLETON; } + private AgentScheduleSynchronizer() { + _executor = new ScheduledThreadPoolExecutor(NUM_WORKERS, new ThreadFactory() { + private AtomicLong i = new AtomicLong(0); + public Thread newThread(Runnable r) { + return new Thread(r, "AgentScheduler" + i.getAndIncrement()); + } + }); + for (int i=0; i<NUM_WORKERS; i++) { + SchedulerThread worker = new SchedulerThread("AgentScheduler" + i); + _workers.add(worker); + _schedule = _executor.scheduleWithFixedDelay(worker, i+1, NUM_WORKERS, TimeUnit.SECONDS); + } + } + + private class SchedulerThread implements Runnable { + private final String _name; + private SchedulerThread(String name) { + _name = name; + } + public String toString() { + return _name; + } + public synchronized void run() { + try { + boolean hasMoreToSchedule = true; + boolean hasMoreToUnschedule = true; + synchronized (_scheduleAeids) { + _stats.addStat(_scheduleAeids.size(), SCHEDULE_QUEUE_SIZE); + } + synchronized (_unscheduleAeids) { + _stats.addStat(_unscheduleAeids.size(), UNSCHEDULE_QUEUE_SIZE); + } + while (hasMoreToSchedule || hasMoreToUnschedule) { + hasMoreToUnschedule = syncMetrics(_unscheduleAeids, false); + hasMoreToSchedule = syncMetrics(_scheduleAeids, true); + } + } catch (Throwable t) { + _log.error(t,t); + } + } + + private boolean syncMetrics(Map scheduleAeids, final boolean schedule) + throws Exception { + Integer agentId = null; + Collection aeids = null; + final boolean debug = _log.isDebugEnabled(); + try { + synchronized (scheduleAeids) { + if (scheduleAeids.isEmpty()) { + return false; + } + for (Iterator it=scheduleAeids.entrySet().iterator(); it.hasNext(); ) { + Entry entry = (Entry) it.next(); + agentId = (Integer) entry.getKey(); + aeids = (Collection) entry.getValue(); + boolean added = _activeAgents.add(agentId); + if (added) { + if (debug) _log.debug("scheduling agentId=" + agentId); + scheduleAeids.remove(agentId); + break; + } else { + agentId = null; + aeids = null; + } + } + } + if (aeids == null || agentId == null || aeids.isEmpty()) { + return false; + } + runSchedule(schedule, agentId, aeids); + return true; + } finally { + if (agentId != null) { + if (debug) _log.debug("agentId=" + agentId + " is finished scheduling"); + _activeAgents.remove(agentId); + } + } + } + + private void runSchedule(final boolean schedule, final Integer agentId, + final Collection aeids) + throws Exception { + SessionManager.runInSession(new SessionRunner() { + public void run() throws Exception { + final MeasurementProcessorLocal mProc = MeasurementProcessorEJBImpl.getOne(); + final AgentManagerLocal aMan = AgentManagerEJBImpl.getOne(); + final Agent agent = aMan.findAgent(agentId); + final AuthzSubject subj = AuthzSubjectManagerEJBImpl.getOne().getOverlordPojo(); + try { + aMan.pingAgent(subj, agent); + } catch (AgentConnectionException e) { + // this only occurs when ping failed (why isn't there a better exception??) + _log.debug(e,e); + } + if (schedule) { + _log.info("scheduling " + aeids.size() + + " resources to agentid=" + agent.getId()); + mProc.scheduleEnabled(agent, aeids); + } else { + _log.info("unscheduling " + aeids.size() + + " resources to agentid=" + agent.getId()); + mProc.unschedule(agent.getAgentToken(), aeids); + } + } + public String getName() { + return _name; + } + }); + } + } + void initialize() { ZeventListener l = new ZeventListener() { public void processEvents(List events) { - final MeasurementProcessorLocal mProc = MeasurementProcessorEJBImpl.getOne(); final List toSchedule = new ArrayList(events.size()); final Map unscheduleMap = new HashMap(events.size()); final boolean debug = _log.isDebugEnabled(); @@ -84,21 +223,42 @@ if (debug) _log.debug("Unschduling eids=[" + event.getEntityIds() + "]"); } } - if (!unscheduleMap.isEmpty()) { - for (Iterator it=unscheduleMap.entrySet().iterator(); it.hasNext();) { - Entry entry = (Entry) it.next(); - String token = (String) entry.getKey(); - List list = new ArrayList((Collection) entry.getValue()); + final AgentManagerLocal aMan = AgentManagerEJBImpl.getOne(); + final Map agentAppdefIds = aMan.getAgentMap(toSchedule); + synchronized (_scheduleAeids) { + for (final Iterator it=agentAppdefIds.entrySet().iterator(); it.hasNext(); ) { + final Entry entry = (Entry) it.next(); + final Integer agentId = (Integer) entry.getKey(); + final Collection eids = (Collection) entry.getValue(); + Collection tmp; + if (null == (tmp = (Collection)_scheduleAeids.get(agentId))) { + tmp = new HashSet(eids.size()); + _scheduleAeids.put(agentId, tmp); + } + tmp.addAll(eids); + } + } + synchronized (_unscheduleAeids) { + for (final Iterator it=unscheduleMap.entrySet().iterator(); it.hasNext(); ) { + final Entry entry = (Entry) it.next(); + final String token = (String) entry.getKey(); + final Collection eids = (Collection) entry.getValue(); + Integer agentId; try { - mProc.unschedule(token, list); - } catch (MeasurementUnscheduleException e) { - _log.error(e,e); + agentId = aMan.getAgent(token).getId(); + } catch (AgentNotFoundException e) { + _log.warn("Could not get agentToken=" + token + + " from db to unschedule: " + e); + continue; } + Collection tmp; + if (null == (tmp = (Collection)_unscheduleAeids.get(agentId))) { + tmp = new HashSet(eids.size()); + _unscheduleAeids.put(agentId, tmp); + } + tmp.addAll(eids); } } - if (!toSchedule.isEmpty()) { - mProc.scheduleSynchronous(toSchedule); - } } public String toString() { return "AgentScheduleSyncListener"; @@ -107,5 +267,5 @@ ZeventManager.getInstance().addBufferedListener(AgentScheduleSyncZevent.class, l); ZeventManager.getInstance().addBufferedListener(AgentUnscheduleZevent.class, l); } - + } Modified: trunk/src/org/hyperic/hq/measurement/server/session/MeasurementProcessorEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/measurement/server/session/MeasurementProcessorEJBImpl.java 2010-04-01 22:28:33 UTC (rev 14461) +++ trunk/src/org/hyperic/hq/measurement/server/session/MeasurementProcessorEJBImpl.java 2010-04-01 23:02:58 UTC (rev 14462) @@ -120,8 +120,10 @@ aeids.add(new AppdefEntityID(e.getTo())); } } - final AgentScheduleSyncZevent event = new AgentScheduleSyncZevent(aeids); - ZeventManager.getInstance().enqueueEventAfterCommit(event); + if (!aeids.isEmpty()) { + final AgentScheduleSyncZevent event = new AgentScheduleSyncZevent(aeids); + ZeventManager.getInstance().enqueueEventAfterCommit(event); + } } /** |
From: <sc...@hy...> - 2010-04-01 22:28:42
|
Author: scottmf Date: 2010-04-01 15:28:33 -0700 (Thu, 01 Apr 2010) New Revision: 14461 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14461 Modified: trunk/src/org/hyperic/hq/application/HQApp.java trunk/src/org/hyperic/hq/hibernate/SessionManager.java Log: added better debugging to session ugrade debug log. added a couple more readonly method signatures for scheduling and pingAgent Modified: trunk/src/org/hyperic/hq/application/HQApp.java =================================================================== --- trunk/src/org/hyperic/hq/application/HQApp.java 2010-04-01 21:25:46 UTC (rev 14460) +++ trunk/src/org/hyperic/hq/application/HQApp.java 2010-04-01 22:28:33 UTC (rev 14461) @@ -551,10 +551,14 @@ SessionManager.currentSession()); } + final boolean debug = _log.isDebugEnabled(); if (!methIsReadOnly(methName)) { - if (_log.isDebugEnabled()) { - _log.debug("Upgrading session, due to [" + methName + - "] on [" + className + "]"); + if (SessionManager.isReadWrite()) { + if (debug) _log.debug("Session already upgraded, log is due to [" + methName + + "] on [" + className + "]"); + } else { + if (debug) _log.debug("Upgrading session, due to [" + methName + + "] on [" + className + "]"); } readWrite = true; SessionManager.setSessionReadWrite(); @@ -605,15 +609,14 @@ } private boolean methIsReadOnly(String methName) { - return methName.equals("runReport") || // ReportCenter - methName.equals("setUserPrefsAfterCommit") || - // 'create' is part of EJB session bean creation + return // 'create' is part of EJB session bean creation methName.equals("create") || methName.equals("disconnectAgent") || // recent alerts & indicators methName.equals("fillAlertCount") || // gather agent metrics methName.equals("handleMeasurementReport") || + methName.equals("initializeTriggers") || // For HQU methods methName.equals("login") || methName.equals("loginGuest") || @@ -621,10 +624,15 @@ methName.equals("logsExistPerInterval") || // JMS methName.equals("onMessage") || + methName.equals("pingAgent") || // masthead methName.equals("resourcesExistOfType") || + // ReportCenter + methName.equals("runReport") || + methName.equals("scheduleEnabled") || methName.equals("search") || - methName.equals("initializeTriggers") || + methName.equals("setUserPrefsAfterCommit") || + methName.equals("unschedule") || methName.startsWith("has") || methName.startsWith("are") || methName.startsWith("check") || Modified: trunk/src/org/hyperic/hq/hibernate/SessionManager.java =================================================================== --- trunk/src/org/hyperic/hq/hibernate/SessionManager.java 2010-04-01 21:25:46 UTC (rev 14460) +++ trunk/src/org/hyperic/hq/hibernate/SessionManager.java 2010-04-01 22:28:33 UTC (rev 14461) @@ -118,6 +118,14 @@ INSTANCE.setSessionReadWriteInternal(); } + public static boolean isReadWrite() { + Session s = (Session)INSTANCE._sessions.get(); + if (s != null && s.getFlushMode().equals(FlushMode.AUTO)) { + return true; + } + return false; + } + private void setSessionReadWriteInternal() { Session s = (Session)_sessions.get(); |
From: <sc...@hy...> - 2010-04-01 21:25:56
|
Author: scottmf Date: 2010-04-01 14:25:46 -0700 (Thu, 01 Apr 2010) New Revision: 14460 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14460 Modified: trunk/src/org/hyperic/hq/autoinventory/ScanState.java trunk/src/org/hyperic/hq/autoinventory/server/session/AutoinventoryManagerEJBImpl.java trunk/src/org/hyperic/hq/product/util/PluginDiscoverer.java Log: for somereason ScanState.getAllServers() was using a logging object that was passed in from the caller. Removed this in favor of ScanState using its own logger. It is very confusing when reading the server.log file otherwise Modified: trunk/src/org/hyperic/hq/autoinventory/ScanState.java =================================================================== --- trunk/src/org/hyperic/hq/autoinventory/ScanState.java 2010-04-01 16:32:35 UTC (rev 14459) +++ trunk/src/org/hyperic/hq/autoinventory/ScanState.java 2010-04-01 21:25:46 UTC (rev 14460) @@ -26,9 +26,9 @@ package org.hyperic.hq.autoinventory; import java.io.BufferedReader; -import java.io.IOException; import java.io.File; import java.io.FileReader; +import java.io.IOException; import java.io.PrintStream; import java.text.DateFormat; import java.util.ArrayList; @@ -42,19 +42,20 @@ import java.util.Set; import java.util.TreeSet; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.hyperic.hq.appdef.shared.AIPlatformValue; +import org.hyperic.hq.appdef.shared.AIServerExtValue; import org.hyperic.hq.appdef.shared.AIServerValue; -import org.hyperic.hq.appdef.shared.AIServerExtValue; import org.hyperic.hq.product.ServerResource; import org.hyperic.util.StringUtil; import org.hyperic.util.StringifiedException; -import org.apache.commons.logging.Log; - public class ScanState { private static HashMap installdirExcludes = new HashMap(); private static List installdirExcludesPrefixes = new ArrayList(); + private static final Log _log = LogFactory.getLog(ScanState.class); static { loadInstalldirExcludes(); @@ -372,7 +373,6 @@ */ public void printStackTraces () { ScanMethodState[] smStates = _core.getScanMethodStates(); - AIServerValue[] servers; StringifiedException[] exc; for ( int i=0; i<smStates.length; i++ ) { exc = smStates[i].getExceptions(); @@ -513,7 +513,7 @@ * is based on the server autoinventory identifier, which is * usually the same as the install path. */ - public Set getAllServers (Log logger) throws AutoinventoryException { + public Set getAllServers () throws AutoinventoryException { // allServers will guarantee uniqueness on the AIID. Set allServers = new TreeSet(COMPARE_AIID); @@ -544,8 +544,8 @@ if ( servers != null ) { for ( int j=0; j<servers.length; j++ ) { if ( !allServers.add(servers[j]) ) { - if ( logger != null ) { - logger.info("Server not added because another scan " + if ( _log != null ) { + _log.info("Server not added because another scan " + "method already detected it:" + servers[j]); } @@ -594,8 +594,8 @@ //disable metric collection server.unsetMeasurementConfig(); - if (logger != null) { - logger.info("Turning off AutoEnable for server " + + if (_log != null) { + _log.info("Turning off AutoEnable for server " + server.getName() + " [" + server.getInstallPath() + "]" + ", has the same metric connect config as " + @@ -651,8 +651,8 @@ if (!AICompare.compareAIPlatforms(p1, p2)) return false; Set servers1, servers2; - servers1 = getAllServers(null); - servers2 = other.getAllServers(null); + servers1 = getAllServers(); + servers2 = other.getAllServers(); if (!AICompare.compareAIServers(servers1, servers2)) return false; return true; Modified: trunk/src/org/hyperic/hq/autoinventory/server/session/AutoinventoryManagerEJBImpl.java =================================================================== --- trunk/src/org/hyperic/hq/autoinventory/server/session/AutoinventoryManagerEJBImpl.java 2010-04-01 16:32:35 UTC (rev 14459) +++ trunk/src/org/hyperic/hq/autoinventory/server/session/AutoinventoryManagerEJBImpl.java 2010-04-01 21:25:46 UTC (rev 14460) @@ -698,11 +698,11 @@ _log.info("Received auto-inventory report from " + aiPlatform.getFqdn() + "; IPs -> " + getIps(aiPlatform.getAddedAIIpValues()) + "; CertDN -> " + aiPlatform.getCertdn() + - "; (" + state.getAllServers(_log).size() + " servers)"); + "; (" + state.getAllServers().size() + " servers)"); if (debug) { _log.debug("AutoinventoryManager.reportAIData called, " + "scan state=" + state); - _log.debug("AISERVERS=" + state.getAllServers(_log)); + _log.debug("AISERVERS=" + state.getAllServers()); } // In the future we may want this method to act as // another user besides "admin". It might make sense to have @@ -730,7 +730,7 @@ AIPlatformValue aiPlatform) throws AutoinventoryException { if (stateCore.getAreServersIncluded()) { - Set serverSet = state.getAllServers(_log); + Set serverSet = state.getAllServers(); final ServerManagerLocal svrMan = ServerManagerEJBImpl.getOne(); for (Iterator it = serverSet.iterator(); it.hasNext();) { AIServerValue aiServer = (AIServerValue)it.next(); Modified: trunk/src/org/hyperic/hq/product/util/PluginDiscoverer.java =================================================================== --- trunk/src/org/hyperic/hq/product/util/PluginDiscoverer.java 2010-04-01 16:32:35 UTC (rev 14459) +++ trunk/src/org/hyperic/hq/product/util/PluginDiscoverer.java 2010-04-01 21:25:46 UTC (rev 14460) @@ -122,7 +122,7 @@ public void scanComplete(ScanState state) throws AutoinventoryException, SystemException { - this.servers = state.getAllServers(this.log); + this.servers = state.getAllServers(); } private void addScanners(ScanConfiguration scanConfig, |
From: Thiago F. de M. <sig...@hy...> - 2010-04-01 20:20:20
|
This discussion starts because the libsigar was compiled not as a shared lib (-DBUILD_SHARED_LIBS:BOOL=OFF). It was because the sigar we are packaging is trunk version, not the stable version. See what was said by Michael Hanke: "Upstream knows about versions and they do use them already. However, this SVN snapshot still uses the old stable version -- nobody knows how often they will break the ABI before they release -- after all this is a development snapshot. I only say that we should not step forward with shared-lib packaging without coordination and a proper release!" It's occurring by email. If you want, I could add you. Thanks! |
From: Generic G. <nt...@gm...> - 2010-04-01 20:20:11
|
I am attempting to perform auto-discovery on a WebLogic JVM which is Oracle WebLogic 10.3 and auto discovery is not working for this release. I made sure the path to WebLogic was present in my agent.properties file, and I also verified using the following command: [user@host agent]$ java -jar pdk/lib/hq-product.jar -Dplugins.include=weblogic -Dadmin.username=weblogic -Dadmin.password=password -m discover 0 servers detected I verified both the agent process and the WebLogic server are running under the same UID/GID. What would be the steps to resolve something like this? If I were to commit a fix (if one doesn't already exist) how would I go about that? |
From: <tr...@hy...> - 2010-04-01 16:32:45
|
Author: trader Date: 2010-04-01 09:32:35 -0700 (Thu, 01 Apr 2010) New Revision: 14459 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14459 Modified: trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereProductPlugin.java Log: HHQ-3849: More flexible interpretation of "useext" property for WebSphere plugin needed Modified: trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereProductPlugin.java =================================================================== --- trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereProductPlugin.java 2010-04-01 07:52:24 UTC (rev 14458) +++ trunk/plugins/websphere/src/org/hyperic/hq/plugin/websphere/WebsphereProductPlugin.java 2010-04-01 16:32:35 UTC (rev 14459) @@ -453,8 +453,10 @@ useJMX = !"false".equals(managerProps.getProperty("websphere.usejmx")); - useExt = "true".equals(managerProps.getProperty("websphere.useext")); - log.debug("useExt=" + useExt); + final String propKey = "websphere.useext"; + String useExtString = managerProps.getProperty(propKey, "false"); + useExt = new Boolean(useExtString).booleanValue(); + log.debug(propKey + "=" + useExt); String installDir = managerProps.getProperty(PROP_INSTALLPATH); |
From: <bo...@hy...> - 2010-04-01 08:23:51
|
Author: bob Date: 2010-04-01 00:52:24 -0700 (Thu, 01 Apr 2010) New Revision: 14458 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14458 Modified: trunk/etc/version.properties Log: Release 4.3.0 build #1395 Modified: trunk/etc/version.properties =================================================================== --- trunk/etc/version.properties 2010-03-31 23:34:31 UTC (rev 14457) +++ trunk/etc/version.properties 2010-04-01 07:52:24 UTC (rev 14458) @@ -1,3 +1,3 @@ -#Wed Mar 31 00:16:13 PDT 2010 +#Thu Apr 01 00:17:59 PDT 2010 version=4.3.0 -build=1394 +build=1395 |
From: Doug M. <do...@hy...> - 2010-04-01 04:08:13
|
I'm missing some context here, also not familiar with the Debian process. Maybe it would be better for me to join that discussion, can you give me a pointer where-to? As for our versions, see: http://support.hyperic.com/display/SIGAR/Home#Home-versions |