protected int getAcceptsInProgress() { StatisticsType st = InternalDistributedSystem.getAnyInstance().findType("CacheServerStats"); Statistics[] s = InternalDistributedSystem.getAnyInstance().findStatisticsByType(st); return s[0].getInt("acceptsInProgress"); }
public void run2() throws CacheException { // wait for 2 samples to ensure all stats have been archived final StatisticsType statSamplerType = getSystem().findType("StatSampler"); final Statistics[] statsArray = getSystem().findStatisticsByType(statSamplerType); assertEquals(1, statsArray.length); final Statistics statSamplerStats = statsArray[0]; final int initialSampleCount = statSamplerStats.getInt(StatSamplerStats.SAMPLE_COUNT); final WaitCriterion wc = new WaitCriterion() { public boolean done() { return statSamplerStats.getInt(StatSamplerStats.SAMPLE_COUNT) >= initialSampleCount + 2; } public String description() { return "Waiting for " + StatSamplerStats.SAMPLE_COUNT + " >= " + initialSampleCount + 2; } }; waitForCriterion(wc, 4*1000, 10, true); // now post total updateEvents to static final PubSubStats statistics = subStatsRef.get(); assertNotNull(statistics); updateEvents.set(statistics.getUpdateEvents()); } });
protected long getCpu() { final StatisticsType type = getSystem().findType("VMStats"); assertNotNull(type); final Statistics[] stats = getSystem().findStatisticsByType(type); assert(stats.length!=0); final Statistics vmStats = stats[0]; return vmStats.getLong("processCpuTime"); }
protected long getCpu() { final StatisticsType type = getSystem().findType("VMStats"); assertNotNull(type); final Statistics[] stats = getSystem().findStatisticsByType(type); assert(stats.length!=0); final Statistics vmStats = stats[0]; long result = vmStats.getLong("processCpuTime"); //getSystem().getLogWriter().info("getCpu returned " + result); return result; } protected int getSampleCount() {
protected int getSampleCount() { final StatisticsType type = getSystem().findType("StatSampler"); assertNotNull(type); final Statistics[] stats = getSystem().findStatisticsByType(type); assert(stats.length!=0); final Statistics statSampler = stats[0]; int result = statSampler.getInt("sampleCount"); return result; }
StatisticsType cachePerfStatsType = internalDS.findType("CachePerfStats"); Statistics[] vmStats = internalDS.findStatisticsByType(vmStatsType); Statistics[] vmMemoryUsageStats = internalDS.findStatisticsByType(vmMemoryUsageStatsType); Statistics[] cachePerfStats = internalDS.findStatisticsByType(cachePerfStatsType);
Statistics[] s = InternalDistributedSystem.getAnyInstance().findStatisticsByType(st); int NumberOfOutOfOrderBatchIds = s[0].getInt("outOfOrderGatewayBatchIds"); getLogWriter().info("NumberOfOutOfOrderBatchIds : " + NumberOfOutOfOrderBatchIds);
StatisticsType type = ds.findType("CachePerfStats"); if(type != null) { Statistics[] statistics = ds.findStatisticsByType(type); if(statistics != null && statistics.length > 0) { cachePerfStats = statistics[0]; StatisticsType type = ds.findType("VMStats"); if(type != null) { Statistics[] statistics = ds.findStatisticsByType(type); if(statistics != null && statistics.length > 0) { vmStats = statistics[0];
StatisticsType type = ds.findType("CachePerfStats"); if(type != null) { Statistics[] statistics = ds.findStatisticsByType(type); if(statistics != null && statistics.length > 0) { cachePerfStats = statistics[0]; StatisticsType type = ds.findType("VMStats"); if(type != null) { Statistics[] statistics = ds.findStatisticsByType(type); if(statistics != null && statistics.length > 0) { vmStats = statistics[0];
systemStats = system.findStatisticsByType(SolarisSystemStats.getType()); } else if (HostStatHelper.isLinux()) { systemStats = system.findStatisticsByType(LinuxSystemStats.getType()); } else if (HostStatHelper.isOSX()) { systemStats = system.findStatisticsByType(WindowsSystemStats.getType());
final Statistics[] statsArray = getSystem().findStatisticsByType(statSamplerType); assertEquals(1, statsArray.length);
public void addVMStats(){ VMStats vmStats = system.getStatSampler().getVMStats(); if (vmStats != null) { Statistics stats = vmStats.getVMStats(); if (stats != null) { vmStatsMonitor.addStatisticsToMonitor(stats); } Statistics vmHeapStats = vmStats.getVMHeapStats(); if (vmHeapStats != null) { vmStatsMonitor.addStatisticsToMonitor(vmHeapStats); } //vmStatsMonitor.addStatisticsToMonitor(vm50.getVMNonHeapStats()); StatisticsType gcType = VMStats.getGCType(); if (gcType != null) { Statistics[] gcStats = system.findStatisticsByType(gcType); if (gcStats != null && gcStats.length > 0){ for (Statistics gcStat : gcStats) { if (gcStat != null) { gcMonitor.addStatisticsToMonitor(gcStat); } } } } } }
public void addVMStats(){ VMStatsContract vmStatsContract = system.getStatSampler().getVMStats(); if (vmStatsContract != null && vmStatsContract instanceof VMStats50){ VMStats50 vmStats50 = (VMStats50) vmStatsContract; Statistics vmStats = vmStats50.getVMStats(); if (vmStats != null) { vmStatsMonitor.addStatisticsToMonitor(vmStats); } Statistics vmHeapStats = vmStats50.getVMHeapStats(); if (vmHeapStats != null) { vmStatsMonitor.addStatisticsToMonitor(vmHeapStats); } //vmStatsMonitor.addStatisticsToMonitor(vm50.getVMNonHeapStats()); StatisticsType gcType = VMStats50.getGCType(); if (gcType != null) { Statistics[] gcStats = system.findStatisticsByType(gcType); if (gcStats != null && gcStats.length > 0){ for (Statistics gcStat : gcStats) { if (gcStat != null) { gcMonitor.addStatisticsToMonitor(gcStat); } } } } } }
systemStats = system.findStatisticsByType(SolarisSystemStats.getType()); } else if (HostStatHelper.isLinux()) { systemStats = system.findStatisticsByType(LinuxSystemStats.getType()); } else if (HostStatHelper.isOSX()) { systemStats = system.findStatisticsByType(WindowsSystemStats.getType());
systemStats = system.findStatisticsByType(SolarisSystemStats.getType()); } else if (HostStatHelper.isLinux()) { systemStats = system.findStatisticsByType(LinuxSystemStats.getType()); } else if (HostStatHelper.isOSX()) { systemStats = system.findStatisticsByType(WindowsSystemStats.getType());
private NetworkServerConnectionStats getMemberClientConnectionStats(InternalDistributedSystem system){ NetworkServerConnectionStats clientConnectionStats = new NetworkServerConnectionStats("Client", ManagementConstants.ZERO, ManagementConstants.ZERO, ManagementConstants.ZERO, ManagementConstants.ZERO, ManagementConstants.ZERO, ManagementConstants.ZERO, ManagementConstants.ZERO); StatisticsType connectionStatsType = system.findType(ConnectionStats.name); if (connectionStatsType != null) { Statistics[] foundStatistics = system.findStatisticsByType(connectionStatsType); for (Statistics statistics : foundStatistics) { clientConnectionStats.updateNetworkServerConnectionStats( statistics.getLong("clientConnectionsOpened"), statistics.getLong("clientConnectionsClosed"), statistics.getLong("clientConnectionsAttempted"), statistics.getLong("clientConnectionsFailed"), statistics.getLong("clientConnectionsLifeTime"), statistics.getLong("clientConnectionsOpen"), statistics.getLong("clientConnectionsIdle") ); } } return clientConnectionStats; }
StatisticsType connectionStatsType = system.findType(ConnectionStats.name); if (connectionStatsType != null) { Statistics[] foundStatistics = system.findStatisticsByType(connectionStatsType);
StatisticsType connectionStatsType = system.findType(ConnectionStats.name); if (connectionStatsType != null) { Statistics[] foundStatistics = system.findStatisticsByType(connectionStatsType);
StatisticsType connectionStatsType = system.findType(ConnectionStats.name); if (connectionStatsType != null) { Statistics[] foundStatistics = system.findStatisticsByType(connectionStatsType);